D4614: narrow: use diffmatcher to send only new filelogs in non-ellipses widening
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Mon Sep 17 13:14:32 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc73c7653dfb9: narrow: use diffmatcher to send only new filelogs in non-ellipses widening (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4614?vs=11109&id=11111
REVISION DETAIL
https://phab.mercurial-scm.org/D4614
AFFECTED FILES
hgext/narrow/narrowbundle2.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
@@ -95,7 +95,7 @@
adding changesets
adding manifests
adding file changes
- added 0 changesets with 1 changes to 2 files
+ added 0 changesets with 1 changes to 1 files
3 local changesets published
$ hg tracked
I path:inside
@@ -154,7 +154,7 @@
adding changesets
adding manifests
adding file changes
- added 0 changesets with 1 changes to 3 files
+ added 0 changesets with 1 changes to 1 files
5 local changesets published
$ hg tracked
I path:inside
@@ -259,7 +259,7 @@
adding changesets
adding manifests
adding file changes
- added 0 changesets with 1 changes to 5 files
+ added 0 changesets with 1 changes to 1 files
11 local changesets published
$ hg tracked
I path:d0
@@ -351,7 +351,7 @@
adding changesets
adding manifests
adding file changes
- added 0 changesets with 1 changes to 2 files
+ added 0 changesets with 1 changes to 1 files
11 local changesets published
$ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
11: local
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -21,6 +21,7 @@
error,
exchange,
extensions,
+ match as matchmod,
narrowspec,
repair,
repository,
@@ -72,6 +73,9 @@
newmatch = narrowspec.match(repo.root, include=include, exclude=exclude)
oldinclude = sorted(filter(bool, kwargs.get(r'oldincludepats', [])))
oldexclude = sorted(filter(bool, kwargs.get(r'oldexcludepats', [])))
+ oldmatch = narrowspec.match(repo.root, include=oldinclude,
+ exclude=oldexclude)
+ diffmatch = matchmod.differencematcher(newmatch, oldmatch)
common = set(common or [nullid])
if (oldinclude != include or oldexclude != exclude):
@@ -84,7 +88,7 @@
# XXX: we should only send the filelogs (and treemanifest). user
# already has the changelog and manifest
packer = changegroup.getbundler(version, repo,
- filematcher=newmatch,
+ filematcher=diffmatch,
fullnodes=commonnodes)
cgdata = packer.generate(set([nullid]), list(commonnodes), False,
source)
To: pulkit, durin42, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list