mercurial/logexchange.py
changeset 48913 f254fc73d956
parent 48875 6000f5b25c9b
child 49760 5bceea1a8234
equal deleted inserted replaced
48912:a0674e916fb6 48913:f254fc73d956
     8 
     8 
     9 
     9 
    10 from .node import hex
    10 from .node import hex
    11 
    11 
    12 from . import (
    12 from . import (
    13     pycompat,
       
    14     util,
    13     util,
    15     vfs as vfsmod,
    14     vfs as vfsmod,
    16 )
    15 )
    17 from .utils import (
    16 from .utils import (
    18     urlutil,
    17     urlutil,
    75     # re-save the data from a different remote than this one.
    74     # re-save the data from a different remote than this one.
    76     for node, oldpath, rname in sorted(olddata):
    75     for node, oldpath, rname in sorted(olddata):
    77         if oldpath != remotepath:
    76         if oldpath != remotepath:
    78             f.write(b'%s\0%s\0%s\n' % (node, oldpath, rname))
    77             f.write(b'%s\0%s\0%s\n' % (node, oldpath, rname))
    79 
    78 
    80     for name, node in sorted(pycompat.iteritems(names)):
    79     for name, node in sorted(names.items()):
    81         if nametype == b"branches":
    80         if nametype == b"branches":
    82             for n in node:
    81             for n in node:
    83                 f.write(b'%s\0%s\0%s\n' % (n, remotepath, name))
    82                 f.write(b'%s\0%s\0%s\n' % (n, remotepath, name))
    84         elif nametype == b"bookmarks":
    83         elif nametype == b"bookmarks":
    85             if node:
    84             if node:
   157     repo = localrepo.unfiltered()
   156     repo = localrepo.unfiltered()
   158 
   157 
   159     with remoterepo.commandexecutor() as e:
   158     with remoterepo.commandexecutor() as e:
   160         branchmap = e.callcommand(b'branchmap', {}).result()
   159         branchmap = e.callcommand(b'branchmap', {}).result()
   161 
   160 
   162     for branch, nodes in pycompat.iteritems(branchmap):
   161     for branch, nodes in branchmap.items():
   163         bmap[branch] = []
   162         bmap[branch] = []
   164         for node in nodes:
   163         for node in nodes:
   165             if node in repo and not repo[node].obsolete():
   164             if node in repo and not repo[node].obsolete():
   166                 bmap[branch].append(hex(node))
   165                 bmap[branch].append(hex(node))
   167 
   166