Patchwork D2233: narrow: only diff manifest part within narrowspec when generating changegroup

login
register
mail settings
Submitter phabricator
Date Feb. 15, 2018, 2:04 a.m.
Message ID <1249ebda289505fbff51c7920014a7ca@localhost.localdomain>
Download mbox | patch
Permalink /patch/27938/
State Not Applicable
Headers show

Comments

phabricator - Feb. 15, 2018, 2:04 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc407ccd06abd: narrow: only diff manifest part within narrowspec when generating changegroup (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2233?vs=5655&id=5731

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

AFFECTED FILES
  hgext/narrow/narrowbundle2.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -141,14 +141,14 @@ 
                 # changesets because it's not always correct. TODO: could
                 # we trust it for the non-merge case?
                 p1mf = mfl[cl.changelogrevision(ps[0]).manifest].read()
-                needed = any(match(f) for f in curmf.diff(p1mf).iterkeys())
+                needed = bool(curmf.diff(p1mf, match))
                 if not needed and len(ps) > 1:
                     # For merge changes, the list of changed files is not
                     # helpful, since we need to emit the merge if a file
                     # in the narrow spec has changed on either side of the
                     # merge. As a result, we do a manifest diff to check.
                     p2mf = mfl[cl.changelogrevision(ps[1]).manifest].read()
-                    needed = any(match(f) for f in curmf.diff(p2mf).iterkeys())
+                    needed = bool(curmf.diff(p2mf, match))
             else:
                 # For a root node, we need to include the node if any
                 # files in the node match the narrowspec.