mercurial/commands.py
changeset 18254 2dfe519d435d
parent 18210 f730ed2e093d
child 18255 7ca534f31a83
equal deleted inserted replaced
18253:a32255dee859 18254:2dfe519d435d
  1825                 remote = localrepo.locallegacypeer(remote.local())
  1825                 remote = localrepo.locallegacypeer(remote.local())
  1826             common, _in, hds = treediscovery.findcommonincoming(repo, remote,
  1826             common, _in, hds = treediscovery.findcommonincoming(repo, remote,
  1827                                                                 force=True)
  1827                                                                 force=True)
  1828             common = set(common)
  1828             common = set(common)
  1829             if not opts.get('nonheads'):
  1829             if not opts.get('nonheads'):
  1830                 ui.write(("unpruned common: %s\n") % " ".join([short(n)
  1830                 ui.write(("unpruned common: %s\n") %
  1831                                                             for n in common]))
  1831                          " ".join(sorted(short(n) for n in common)))
  1832                 dag = dagutil.revlogdag(repo.changelog)
  1832                 dag = dagutil.revlogdag(repo.changelog)
  1833                 all = dag.ancestorset(dag.internalizeall(common))
  1833                 all = dag.ancestorset(dag.internalizeall(common))
  1834                 common = dag.externalizeall(dag.headsetofconnecteds(all))
  1834                 common = dag.externalizeall(dag.headsetofconnecteds(all))
  1835         else:
  1835         else:
  1836             common, any, hds = setdiscovery.findcommonheads(ui, repo, remote)
  1836             common, any, hds = setdiscovery.findcommonheads(ui, repo, remote)
  1837         common = set(common)
  1837         common = set(common)
  1838         rheads = set(hds)
  1838         rheads = set(hds)
  1839         lheads = set(repo.heads())
  1839         lheads = set(repo.heads())
  1840         ui.write(("common heads: %s\n") % " ".join([short(n) for n in common]))
  1840         ui.write(("common heads: %s\n") %
       
  1841                  " ".join(sorted(short(n) for n in common)))
  1841         if lheads <= common:
  1842         if lheads <= common:
  1842             ui.write(("local is subset\n"))
  1843             ui.write(("local is subset\n"))
  1843         elif rheads <= common:
  1844         elif rheads <= common:
  1844             ui.write(("remote is subset\n"))
  1845             ui.write(("remote is subset\n"))
  1845 
  1846 
  2132             ui.write(hex(m.precnode()))
  2133             ui.write(hex(m.precnode()))
  2133             for repl in m.succnodes():
  2134             for repl in m.succnodes():
  2134                 ui.write(' ')
  2135                 ui.write(' ')
  2135                 ui.write(hex(repl))
  2136                 ui.write(hex(repl))
  2136             ui.write(' %X ' % m._data[2])
  2137             ui.write(' %X ' % m._data[2])
  2137             ui.write(m.metadata())
  2138             ui.write('{%s}' % (', '.join('%r: %r' % t for t in
       
  2139                                          sorted(m.metadata().items()))))
  2138             ui.write('\n')
  2140             ui.write('\n')
  2139 
  2141 
  2140 @command('debugpushkey', [], _('REPO NAMESPACE [KEY OLD NEW]'))
  2142 @command('debugpushkey', [], _('REPO NAMESPACE [KEY OLD NEW]'))
  2141 def debugpushkey(ui, repopath, namespace, *keyinfo, **opts):
  2143 def debugpushkey(ui, repopath, namespace, *keyinfo, **opts):
  2142     '''access the pushkey key/value protocol
  2144     '''access the pushkey key/value protocol