comparison hg_delta_editor.py @ 119:ea65fe2b0856

hg_delta_editor: fix update of stray files in branches/ Ensure that self.current_file is a non-empty path in a branch.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 29 Nov 2008 11:25:01 -0600
parents 30580c05dccc
children f508c1fa19a5
comparison
equal deleted inserted replaced
118:a0401f6e14dd 119:ea65fe2b0856
487 self.ui.status('D %s\n' % path) 487 self.ui.status('D %s\n' % path)
488 488
489 @stash_exception_on_self 489 @stash_exception_on_self
490 def open_file(self, path, parent_baton, base_revision, p=None): 490 def open_file(self, path, parent_baton, base_revision, p=None):
491 self.current_file = 'foobaz' 491 self.current_file = 'foobaz'
492 if self._is_path_valid(path): 492 fpath, branch = self._path_and_branch_for_path(path)
493 if fpath:
493 self.current_file = path 494 self.current_file = path
494 self.ui.status('M %s\n' % path) 495 self.ui.status('M %s\n' % path)
495 if base_revision != -1: 496 if base_revision != -1:
496 self.base_revision = base_revision 497 self.base_revision = base_revision
497 else: 498 else:
527 copyfrom_revision, file_pool=None): 528 copyfrom_revision, file_pool=None):
528 self.current_file = 'foobaz' 529 self.current_file = 'foobaz'
529 self.base_revision = None 530 self.base_revision = None
530 if path in self.deleted_files: 531 if path in self.deleted_files:
531 del self.deleted_files[path] 532 del self.deleted_files[path]
532 if not self._is_path_valid(path):
533 return
534 fpath, branch = self._path_and_branch_for_path(path) 533 fpath, branch = self._path_and_branch_for_path(path)
535 if not fpath: 534 if not fpath:
536 return 535 return
537 self.current_file = path 536 self.current_file = path
538 self.should_edit_most_recent_plaintext = False 537 self.should_edit_most_recent_plaintext = False