D4639: narrow: don't send the changelog information when widening without ellipses

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Sep 18 13:55:19 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf1844a10ee19: narrow: don't send the changelog information when widening without ellipses (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4639?vs=11138&id=11146

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

AFFECTED FILES
  hgext/narrow/narrowbundle2.py
  hgext/narrow/narrowcommands.py
  tests/test-narrow-widen-no-ellipsis.t

CHANGE DETAILS

diff --git a/tests/test-narrow-widen-no-ellipsis.t b/tests/test-narrow-widen-no-ellipsis.t
--- a/tests/test-narrow-widen-no-ellipsis.t
+++ b/tests/test-narrow-widen-no-ellipsis.t
@@ -106,9 +106,6 @@
   bundle2-input-bundle: with-transaction
   bundle2-input-part: "changegroup" (params: * mandatory) supported (glob)
   adding changesets
-  add changeset * (glob)
-  add changeset * (glob)
-  add changeset * (glob)
   adding manifests
   adding widest/ revisions (tree !)
   adding file changes
diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -260,14 +260,16 @@
     def setnewnarrowpats():
         repo.setnarrowpats(newincludes, newexcludes)
     repo.setnewnarrowpats = setnewnarrowpats
+    # silence the devel-warning of applying an empty changegroup
+    overrides = {('devel', 'all-warnings'): False}
 
     with ui.uninterruptable():
         ds = repo.dirstate
         p1, p2 = ds.p1(), ds.p2()
         with ds.parentchange():
             ds.setparents(node.nullid, node.nullid)
         common = commoninc[0]
-        with wrappedextraprepare:
+        with wrappedextraprepare, repo.ui.configoverride(overrides, 'widen'):
             exchange.pull(repo, remote, heads=common)
         with ds.parentchange():
             ds.setparents(p1, p2)
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -91,7 +91,7 @@
                                             filematcher=diffmatch,
                                             fullnodes=commonnodes)
             cgdata = packer.generate(set([nullid]), list(commonnodes), False,
-                    source)
+                                     source, changelog=False)
 
             part = bundler.newpart('changegroup', data=cgdata)
             part.addparam('version', version)



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


More information about the Mercurial-devel mailing list