Mercurial > hgsubversion
comparison hg_delta_editor.py @ 217:6eb691a163cd
hg_delta_editor: stop using foobaz as a bogus filename.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 28 Mar 2009 14:27:27 -0500 |
parents | 1416429584b2 |
children | a360ddc97719 |
comparison
equal
deleted
inserted
replaced
216:3c87de482011 | 217:6eb691a163cd |
---|---|
344 if inc is None or exc is not None: | 344 if inc is None or exc is not None: |
345 return False | 345 return False |
346 return True | 346 return True |
347 | 347 |
348 def _is_path_valid(self, path): | 348 def _is_path_valid(self, path): |
349 if path is None: | |
350 return False | |
349 subpath = self._split_branch_path(path)[0] | 351 subpath = self._split_branch_path(path)[0] |
350 if subpath is None: | 352 if subpath is None: |
351 return False | 353 return False |
352 return self._is_file_included(subpath) | 354 return self._is_file_included(subpath) |
353 | 355 |
823 self.delete_file(f_p) | 825 self.delete_file(f_p) |
824 self.delete_file(path) | 826 self.delete_file(path) |
825 delete_entry = stash_exception_on_self(delete_entry) | 827 delete_entry = stash_exception_on_self(delete_entry) |
826 | 828 |
827 def open_file(self, path, parent_baton, base_revision, p=None): | 829 def open_file(self, path, parent_baton, base_revision, p=None): |
828 self.current_file = 'foobaz' | 830 self.current_file = None |
829 fpath, branch = self._path_and_branch_for_path(path) | 831 fpath, branch = self._path_and_branch_for_path(path) |
830 if fpath: | 832 if fpath: |
831 self.current_file = path | 833 self.current_file = path |
832 self.ui.note('M %s\n' % path) | 834 self.ui.note('M %s\n' % path) |
833 if base_revision != -1: | 835 if base_revision != -1: |
866 # parentctx is not an ancestor of childctx, files are unrelated | 868 # parentctx is not an ancestor of childctx, files are unrelated |
867 return False | 869 return False |
868 | 870 |
869 def add_file(self, path, parent_baton, copyfrom_path, | 871 def add_file(self, path, parent_baton, copyfrom_path, |
870 copyfrom_revision, file_pool=None): | 872 copyfrom_revision, file_pool=None): |
871 self.current_file = 'foobaz' | 873 self.current_file = None |
872 self.base_revision = None | 874 self.base_revision = None |
873 if path in self.deleted_files: | 875 if path in self.deleted_files: |
874 del self.deleted_files[path] | 876 del self.deleted_files[path] |
875 fpath, branch = self._path_and_branch_for_path(path, existing=False) | 877 fpath, branch = self._path_and_branch_for_path(path, existing=False) |
876 if not fpath: | 878 if not fpath: |
928 cp_f = '' | 930 cp_f = '' |
929 else: | 931 else: |
930 source_rev = copyfrom_revision | 932 source_rev = copyfrom_revision |
931 cp_f, source_branch = self._path_and_branch_for_path(copyfrom_path) | 933 cp_f, source_branch = self._path_and_branch_for_path(copyfrom_path) |
932 if cp_f == '' and br_path == '': | 934 if cp_f == '' and br_path == '': |
935 assert br_path is not None | |
933 self.branches[branch] = source_branch, source_rev, self.current_rev.revnum | 936 self.branches[branch] = source_branch, source_rev, self.current_rev.revnum |
934 new_hash = self.get_parent_revision(source_rev + 1, | 937 new_hash = self.get_parent_revision(source_rev + 1, |
935 source_branch) | 938 source_branch) |
936 if new_hash == node.nullid: | 939 if new_hash == node.nullid: |
937 self.missing_plaintexts.add('%s/' % path) | 940 self.missing_plaintexts.add('%s/' % path) |