diff hgext/narrow/narrowcommands.py @ 41229:50ca531f1f24

narrow: copy store narrowspec to working copy immediately We no longer need to delay it until the end of the transaction since we now restore a backup if the transaction aborts. Differential Revision: https://phab.mercurial-scm.org/D5506
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 29 Dec 2018 23:01:12 -0800
parents 4475322b7533
children 44a51c1c8e17
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py	Sat Dec 29 22:34:38 2018 -0800
+++ b/hgext/narrow/narrowcommands.py	Sat Dec 29 23:01:12 2018 -0800
@@ -432,9 +432,9 @@
         return 0
 
     if update_working_copy:
-        with repo.wlock(), repo.lock(), repo.transaction('narrow-wc') as tr:
+        with repo.wlock(), repo.lock(), repo.transaction('narrow-wc'):
             narrowspec.updateworkingcopy(repo)
-            narrowspec.copytoworkingcopy(repo, tr)
+            narrowspec.copytoworkingcopy(repo)
         return 0
 
     if not widening and not narrowing: