Patchwork D2492: narrow: reduce depedence on narrowspec.save()

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 2:18 a.m.
Message ID <bb3a00d66b4aa958449d2bffed8b1a70@localhost.localdomain>
Download mbox | patch
Permalink /patch/28525/
State Not Applicable
Headers show

Comments

phabricator - March 1, 2018, 2:18 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe5005ade8860: narrow: reduce depedence on narrowspec.save() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2492?vs=6192&id=6225

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

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

CHANGE DETAILS




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

Patch

diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -88,7 +88,7 @@ 
                 # everything, except what they asked to exclude.
                 includepats = {'path:.'}
 
-            narrowspec.save(pullop.repo, includepats, excludepats)
+            pullop.repo.setnarrowpats(includepats, excludepats)
 
             # This will populate 'includepats' etc with the values from the
             # narrowspec we just saved.
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -361,11 +361,10 @@ 
 def _handlechangespec_2(op, inpart):
     includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines())
     excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines())
-    narrowspec.save(op.repo, includepats, excludepats)
     if not changegroup.NARROW_REQUIREMENT in op.repo.requirements:
         op.repo.requirements.add(changegroup.NARROW_REQUIREMENT)
         op.repo._writerequirements()
-    op.repo.invalidate(clearfilecache=True)
+    op.repo.setnarrowpats(includepats, excludepats)
 
 @bundle2.parthandler(_CHANGESPECPART)
 def _handlechangespec(op, inpart):