Mercurial > hgsubversion
changeset 55:987e44afa71e
hg_delta_editor: simplify exec/symlink flags generation
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 03 Nov 2008 08:43:07 -0600 |
parents | db7a1ab8851a |
children | 0be16f306a42 |
files | hg_delta_editor.py |
diffstat | 1 files changed, 5 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hg_delta_editor.py +++ b/hg_delta_editor.py @@ -347,20 +347,16 @@ class HgChangeReceiver(delta.Editor): extra['branch'] = branch parent_ctx = self.repo.changectx(parents[0]) def filectxfn(repo, memctx, path): - is_link = False - is_exec = False copied = None current_file = files[path] if current_file in self.deleted_files: raise IOError() # TODO(augie) tag copies from files - if path in parent_ctx: - is_exec = 'x' in parent_ctx.flags(path) - is_link = 'l' in parent_ctx.flags(path) - if current_file in self.current_files_exec: - is_exec = self.current_files_exec[current_file] - if current_file in self.current_files_symlink: - is_link = self.current_files_symlink[current_file] + flags = parent_ctx.flags(path) + is_exec = self.current_files_exec.get(current_file, + 'x' in flags) + is_link = self.current_files_symlink.get(current_file, + 'l' in flags) if current_file in self.current_files: data = self.current_files[current_file] if is_link: