Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
581:90efea2c19df | 582:44c56a7727c4 |
---|---|
214 ctx = self.repo.changectx(ha) | 214 ctx = self.repo.changectx(ha) |
215 if from_file in ctx: | 215 if from_file in ctx: |
216 fctx = ctx.filectx(from_file) | 216 fctx = ctx.filectx(from_file) |
217 flags = fctx.flags() | 217 flags = fctx.flags() |
218 self.current.set(path, fctx.data(), 'x' in flags, 'l' in flags) | 218 self.current.set(path, fctx.data(), 'x' in flags, 'l' in flags) |
219 if from_branch == branch: | 219 if from_branch == branch: |
220 parentid = self.meta.get_parent_revision(self.current.rev.revnum, | 220 parentid = self.meta.get_parent_revision( |
221 branch) | 221 self.current.rev.revnum, branch) |
222 if parentid != revlog.nullid: | 222 if parentid != revlog.nullid: |
223 parentctx = self.repo.changectx(parentid) | 223 parentctx = self.repo.changectx(parentid) |
224 if util.issamefile(parentctx, ctx, from_file): | 224 if util.issamefile(parentctx, ctx, from_file): |
225 self.current.copies[path] = from_file | 225 self.current.copies[path] = from_file |
226 | 226 |
227 @ieditor | 227 @ieditor |
228 def add_directory(self, path, parent_baton, copyfrom_path, | 228 def add_directory(self, path, parent_baton, copyfrom_path, |
229 copyfrom_revision, dir_pool=None): | 229 copyfrom_revision, dir_pool=None): |
230 self.current.batons[path] = path | 230 self.current.batons[path] = path |