hgext/narrow/narrowbundle2.py
changeset 47012 d55b71393907
parent 45942 89a2afe31e82
child 47439 86418ad637d1
equal deleted inserted replaced
46992:5fa019ceb499 47012:d55b71393907
     9 
     9 
    10 import errno
    10 import errno
    11 import struct
    11 import struct
    12 
    12 
    13 from mercurial.i18n import _
    13 from mercurial.i18n import _
    14 from mercurial.node import nullid
       
    15 from mercurial import (
    14 from mercurial import (
    16     bundle2,
    15     bundle2,
    17     changegroup,
    16     changegroup,
    18     error,
    17     error,
    19     exchange,
    18     exchange,
    92         depth = int(depth)
    91         depth = int(depth)
    93         if depth < 1:
    92         if depth < 1:
    94             raise error.Abort(_(b'depth must be positive, got %d') % depth)
    93             raise error.Abort(_(b'depth must be positive, got %d') % depth)
    95 
    94 
    96     heads = set(heads or repo.heads())
    95     heads = set(heads or repo.heads())
    97     common = set(common or [nullid])
    96     common = set(common or [repo.nullid])
    98 
    97 
    99     visitnodes, relevant_nodes, ellipsisroots = exchange._computeellipsis(
    98     visitnodes, relevant_nodes, ellipsisroots = exchange._computeellipsis(
   100         repo, common, heads, set(), match, depth=depth
    99         repo, common, heads, set(), match, depth=depth
   101     )
   100     )
   102 
   101 
   126     newmatch,
   125     newmatch,
   127     version,
   126     version,
   128     common,
   127     common,
   129     known,
   128     known,
   130 ):
   129 ):
   131     common = set(common or [nullid])
   130     common = set(common or [repo.nullid])
   132     # Steps:
   131     # Steps:
   133     # 1. Send kill for "$known & ::common"
   132     # 1. Send kill for "$known & ::common"
   134     #
   133     #
   135     # 2. Send changegroup for ::common
   134     # 2. Send changegroup for ::common
   136     #
   135     #