--- a/mercurial/cmdutil.py Mon Apr 30 20:36:29 2012 +0200
+++ b/mercurial/cmdutil.py Mon Apr 30 20:45:45 2012 +0200
@@ -1296,9 +1296,6 @@
wlock = repo.wlock()
try:
- # Fix up dirstate for copies and renames
- duplicatecopies(repo, None, base.node())
-
# First, do a regular commit to record all changes in the working
# directory (if there are any)
node = commit(ui, repo, commitfunc, pats, opts)
@@ -1326,6 +1323,8 @@
date = ctx.date()
message = ctx.description()
extra = ctx.extra()
+ # Recompute copies (avoid recording a -> b -> a)
+ copied = copies.pathcopies(base, ctx)
# Prune files which were reverted by the updates: if old introduced
# file X and our intermediate commit, node, renamed that file, then
@@ -1339,8 +1338,7 @@
if f in base.manifest():
b = base.filectx(f)
return (a.data() == b.data()
- and a.flags() == b.flags()
- and a.renamed() == b.renamed())
+ and a.flags() == b.flags())
else:
return False
else:
@@ -1349,7 +1347,13 @@
def filectxfn(repo, ctx_, path):
try:
- return ctx.filectx(path)
+ fctx = ctx[path]
+ flags = fctx.flags()
+ mctx = context.memfilectx(fctx.path(), fctx.data(),
+ islink='l' in flags,
+ isexec='x' in flags,
+ copied=copied.get(path))
+ return mctx
except KeyError:
raise IOError()
else: