Mercurial > hgsubversion
diff hgsubversion/editor.py @ 582:44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Known failures:
- comprehensive/test_verify on replace_branch_with_branch: replaced files
content is incorrect
- comprehensive/test_stupid_pull on replace_branch_with_branch: very stupid
mode does not handle replacements correctly.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 02 Mar 2010 17:06:06 +0100 |
parents | ebd8fb1a05e4 |
children | c3ba4ca81d16 |
line wrap: on
line diff
--- a/hgsubversion/editor.py +++ b/hgsubversion/editor.py @@ -216,13 +216,13 @@ class HgEditor(delta.Editor): fctx = ctx.filectx(from_file) flags = fctx.flags() self.current.set(path, fctx.data(), 'x' in flags, 'l' in flags) - if from_branch == branch: - parentid = self.meta.get_parent_revision(self.current.rev.revnum, - branch) - if parentid != revlog.nullid: - parentctx = self.repo.changectx(parentid) - if util.issamefile(parentctx, ctx, from_file): - self.current.copies[path] = from_file + if from_branch == branch: + parentid = self.meta.get_parent_revision( + self.current.rev.revnum, branch) + if parentid != revlog.nullid: + parentctx = self.repo.changectx(parentid) + if util.issamefile(parentctx, ctx, from_file): + self.current.copies[path] = from_file @ieditor def add_directory(self, path, parent_baton, copyfrom_path,