changeset 22094:7d7065476fea

largefiles: put whole rollback-ing process into the same "wlock" scope Before this patch, there are three distinct "wlock" scopes in "overriderollback": 1. "localrepository.rollback" via original "rollback" command, 2. "merge.update" for reverting standin files only, and 3. "overriderollback" specific "wlock" scope (to synchronize largefile dirstate) But these should be executed in the same "wlock" scope for consistency.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 11 Aug 2014 22:29:43 +0900
parents 45611a306f77
children cb62d77c7a01
files hgext/largefiles/overrides.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Mon Aug 11 09:35:24 2014 -0500
+++ b/hgext/largefiles/overrides.py	Mon Aug 11 22:29:43 2014 +0900
@@ -1140,11 +1140,12 @@
     repo.status = oldstatus
 
 def overriderollback(orig, ui, repo, **opts):
-    result = orig(ui, repo, **opts)
-    merge.update(repo, node=None, branchmerge=False, force=True,
-        partial=lfutil.isstandin)
     wlock = repo.wlock()
     try:
+        result = orig(ui, repo, **opts)
+        merge.update(repo, node=None, branchmerge=False, force=True,
+                     partial=lfutil.isstandin)
+
         lfdirstate = lfutil.openlfdirstate(ui, repo)
         lfiles = lfutil.listlfiles(repo)
         oldlfiles = lfutil.listlfiles(repo, repo[None].parents()[0].rev())