mercurial/merge.py
changeset 14398 ae1f7a5373e8
parent 14232 df2399663392
child 14405 f2295a829f47
--- a/mercurial/merge.py	Fri May 20 21:04:45 2011 +0300
+++ b/mercurial/merge.py	Sat May 21 02:05:00 2011 +0200
@@ -296,14 +296,15 @@
             if f != fd and move:
                 moves.append(f)
 
+    audit = scmutil.pathauditor(repo.root)
+
     # remove renamed files after safely stored
     for f in moves:
         if os.path.lexists(repo.wjoin(f)):
             repo.ui.debug("removing %s\n" % f)
+            audit(f)
             os.unlink(repo.wjoin(f))
 
-    audit_path = scmutil.pathauditor(repo.root)
-
     numupdates = len(action)
     for i, a in enumerate(action):
         f, m = a[:2]
@@ -313,7 +314,7 @@
             continue
         if m == "r": # remove
             repo.ui.note(_("removing %s\n") % f)
-            audit_path(f)
+            audit(f)
             if f == '.hgsubstate': # subrepo states need updating
                 subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
             try:
@@ -340,6 +341,7 @@
             if (move and repo.dirstate.normalize(fd) != f
                 and os.path.lexists(repo.wjoin(f))):
                 repo.ui.debug("removing %s\n" % f)
+                audit(f)
                 os.unlink(repo.wjoin(f))
         elif m == "g": # get
             flags = a[2]
@@ -354,6 +356,7 @@
             f2, fd, flags = a[2:]
             if f:
                 repo.ui.note(_("moving %s to %s\n") % (f, fd))
+                audit(f)
                 t = wctx.filectx(f).data()
                 repo.wwrite(fd, t, flags)
                 util.unlinkpath(repo.wjoin(f))