Patchwork D7097: widening: remove "depth" argument since it's always None

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2019, 2:22 p.m.
Message ID <0d918a9ca41fe01b581ea16b7d01c6c4@localhost.localdomain>
Download mbox | patch
Permalink /patch/42399/
State Not Applicable
Headers show

Comments

phabricator - Oct. 16, 2019, 2:22 p.m.
Closed by commit rHG1634188b1e67: widening: remove &quot;depth&quot; argument since it&#039;s always None (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7097?vs=17151&id=17215

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7097/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7097

AFFECTED FILES
  hgext/narrow/narrowbundle2.py
  hgext/narrow/narrowwirepeer.py

CHANGE DETAILS




To: martinvonz, durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/narrow/narrowwirepeer.py b/hgext/narrow/narrowwirepeer.py
--- a/hgext/narrow/narrowwirepeer.py
+++ b/hgext/narrow/narrowwirepeer.py
@@ -130,7 +130,6 @@ 
                 cgversion,
                 common,
                 known,
-                None,
             )
     except error.Abort as exc:
         bundler = bundle2.bundle20(repo.ui)
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -121,15 +121,10 @@ 
     version,
     common,
     known,
-    depth,
 ):
     newmatch = narrowspec.match(
         repo.root, include=newinclude, exclude=newexclude
     )
-    if depth is not None:
-        depth = int(depth)
-        if depth < 1:
-            raise error.Abort(_(b'depth must be positive, got %d') % depth)
 
     common = set(common or [nullid])
     # Steps:
@@ -173,7 +168,7 @@ 
             repo,
             matcher=newmatch,
             ellipses=True,
-            shallow=depth is not None,
+            shallow=False,
             ellipsisroots=newellipsis,
             fullnodes=newfull,
         )