hgext/largefiles/reposetup.py
branchstable
changeset 17230 fc4c155658b7
parent 16731 dcfc70aab372
child 17424 e7cfe3587ea4
--- a/hgext/largefiles/reposetup.py	Thu Jul 19 06:30:59 2012 -0400
+++ b/hgext/largefiles/reposetup.py	Thu Jul 19 10:00:15 2012 -0400
@@ -338,15 +338,18 @@
                                     lfutil.updatestandin(self,
                                         lfutil.standin(lfile))
                                     lfdirstate.normal(lfile)
-                    for lfile in lfdirstate:
-                        if lfile in modifiedfiles:
-                            if (not os.path.exists(repo.wjoin(
-                               lfutil.standin(lfile)))) or \
-                               (not os.path.exists(repo.wjoin(lfile))):
-                                lfdirstate.drop(lfile)
 
                     result = orig(text=text, user=user, date=date, match=match,
                                     force=force, editor=editor, extra=extra)
+
+                    if result is not None:
+                        for lfile in lfdirstate:
+                            if lfile in modifiedfiles:
+                                if (not os.path.exists(repo.wjoin(
+                                   lfutil.standin(lfile)))) or \
+                                   (not os.path.exists(repo.wjoin(lfile))):
+                                    lfdirstate.drop(lfile)
+
                     # This needs to be after commit; otherwise precommit hooks
                     # get the wrong status
                     lfdirstate.write()