mercurial/wireprotov2server.py
changeset 47012 d55b71393907
parent 46895 6085b7f1536d
child 47877 2174f54aab18
equal deleted inserted replaced
46992:5fa019ceb499 47012:d55b71393907
     8 
     8 
     9 import collections
     9 import collections
    10 import contextlib
    10 import contextlib
    11 
    11 
    12 from .i18n import _
    12 from .i18n import _
    13 from .node import (
    13 from .node import hex
    14     hex,
       
    15     nullid,
       
    16 )
       
    17 from . import (
    14 from . import (
    18     discovery,
    15     discovery,
    19     encoding,
    16     encoding,
    20     error,
    17     error,
    21     match as matchmod,
    18     match as matchmod,
   948                 )
   945                 )
   949 
   946 
   950             if spec[b'roots']:
   947             if spec[b'roots']:
   951                 common = [n for n in spec[b'roots'] if clhasnode(n)]
   948                 common = [n for n in spec[b'roots'] if clhasnode(n)]
   952             else:
   949             else:
   953                 common = [nullid]
   950                 common = [repo.nullid]
   954 
   951 
   955             for n in discovery.outgoing(repo, common, spec[b'heads']).missing:
   952             for n in discovery.outgoing(repo, common, spec[b'heads']).missing:
   956                 if n not in seen:
   953                 if n not in seen:
   957                     nodes.append(n)
   954                     nodes.append(n)
   958                     seen.add(n)
   955                     seen.add(n)