Patchwork D5515: narrow: drop explicit dirstate write

login
register
mail settings
Submitter phabricator
Date Jan. 10, 2019, 7:10 p.m.
Message ID <5efd24199d305d64c72d872150eb9f74@localhost.localdomain>
Download mbox | patch
Permalink /patch/37627/
State Not Applicable
Headers show

Comments

phabricator - Jan. 10, 2019, 7:10 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4475322b7533: narrow: drop explicit dirstate write (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5515?vs=13052&id=13141

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

AFFECTED FILES
  hgext/narrow/narrowcommands.py
  mercurial/narrowspec.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py
--- a/mercurial/narrowspec.py
+++ b/mercurial/narrowspec.py
@@ -266,7 +266,7 @@ 
         raise error.Abort(_("working copy's narrowspec is stale"),
                           hint=_("run 'hg tracked --update-working-copy'"))
 
-def updateworkingcopy(repo, tr):
+def updateworkingcopy(repo):
     oldspec = repo.vfs.tryread(DIRSTATE_FILENAME)
     newspec = repo.svfs.tryread(FILENAME)
 
@@ -294,5 +294,3 @@ 
     for f in newfiles:
         ds.normallookup(f)
     _writeaddedfiles(repo, pctx, newfiles)
-
-    ds.write(tr)
diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py
--- a/hgext/narrow/narrowcommands.py
+++ b/hgext/narrow/narrowcommands.py
@@ -433,7 +433,7 @@ 
 
     if update_working_copy:
         with repo.wlock(), repo.lock(), repo.transaction('narrow-wc') as tr:
-            narrowspec.updateworkingcopy(repo, tr)
+            narrowspec.updateworkingcopy(repo)
             narrowspec.copytoworkingcopy(repo, tr)
         return 0