Mercurial > hgsubversion
comparison hg_delta_editor.py @ 329:235022089da6
merge with stable
| author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
|---|---|
| date | Sat, 09 May 2009 12:36:17 +0200 |
| parents | 33736e2e25f0 05cd4a5138bf |
| children | 5f8f2fd4fd54 |
comparison
equal
deleted
inserted
replaced
| 328:48ec2d62dc29 | 329:235022089da6 |
|---|---|
| 638 parentctx = self.repo.changectx(ha) | 638 parentctx = self.repo.changectx(ha) |
| 639 parents = (ha, closed) | 639 parents = (ha, closed) |
| 640 def del_all_files(*args): | 640 def del_all_files(*args): |
| 641 raise IOError | 641 raise IOError |
| 642 files = parentctx.manifest().keys() | 642 files = parentctx.manifest().keys() |
| 643 extra = {} | |
| 644 if not self.opts.get('svn_no_branchnames', False): | |
| 645 extra['branch'] = 'closed-branches' | |
| 643 current_ctx = context.memctx(self.repo, | 646 current_ctx = context.memctx(self.repo, |
| 644 parents, | 647 parents, |
| 645 rev.message or ' ', | 648 rev.message or ' ', |
| 646 files, | 649 files, |
| 647 del_all_files, | 650 del_all_files, |
| 648 self.authors[rev.author], | 651 self.authors[rev.author], |
| 649 date, | 652 date, |
| 650 {'branch': 'closed-branches'}) | 653 extra) |
| 651 new_hash = self.repo.commitctx(current_ctx) | 654 new_hash = self.repo.commitctx(current_ctx) |
| 652 self.ui.status('Marked branch %s as closed.\n' % (branch or | 655 self.ui.status('Marked branch %s as closed.\n' % (branch or |
| 653 'default')) | 656 'default')) |
| 654 for branch, files in branch_batches.iteritems(): | 657 for branch, files in branch_batches.iteritems(): |
| 655 if branch in self.commit_branches_empty and files: | 658 if branch in self.commit_branches_empty and files: |
| 691 data = parent_ctx.filectx(path).data() | 694 data = parent_ctx.filectx(path).data() |
| 692 return context.memfilectx(path=path, | 695 return context.memfilectx(path=path, |
| 693 data=data, | 696 data=data, |
| 694 islink=is_link, isexec=is_exec, | 697 islink=is_link, isexec=is_exec, |
| 695 copied=copied) | 698 copied=copied) |
| 699 if self.opts.get('svn_no_branchnames', False): | |
| 700 extra.pop('branch', None) | |
| 696 current_ctx = context.memctx(self.repo, | 701 current_ctx = context.memctx(self.repo, |
| 697 parents, | 702 parents, |
| 698 rev.message or '...', | 703 rev.message or '...', |
| 699 files.keys(), | 704 files.keys(), |
| 700 filectxfn, | 705 filectxfn, |
| 718 raise hgutil.Abort('Empty commit to an open branch attempted. ' | 723 raise hgutil.Abort('Empty commit to an open branch attempted. ' |
| 719 'Please report this issue.') | 724 'Please report this issue.') |
| 720 extra = util.build_extra(rev.revnum, branch, | 725 extra = util.build_extra(rev.revnum, branch, |
| 721 open(self.uuid_file).read(), | 726 open(self.uuid_file).read(), |
| 722 self.subdir) | 727 self.subdir) |
| 728 if self.opts.get('svn_no_branchnames', False): | |
| 729 extra.pop('branch', None) | |
| 723 current_ctx = context.memctx(self.repo, | 730 current_ctx = context.memctx(self.repo, |
| 724 (ha, node.nullid), | 731 (ha, node.nullid), |
| 725 rev.message or ' ', | 732 rev.message or ' ', |
| 726 [], | 733 [], |
| 727 del_all_files, | 734 del_all_files, |
| 860 if baserev is None or baserev == -1: | 867 if baserev is None or baserev == -1: |
| 861 baserev = self.current_rev.revnum - 1 | 868 baserev = self.current_rev.revnum - 1 |
| 862 parent = self.get_parent_revision(baserev + 1, branch) | 869 parent = self.get_parent_revision(baserev + 1, branch) |
| 863 self.load_base_from_ctx(path, fpath, self.repo.changectx(parent)) | 870 self.load_base_from_ctx(path, fpath, self.repo.changectx(parent)) |
| 864 else: | 871 else: |
| 865 self.ui.warn('WARNING: Opening non-existant file %s\n' % path) | 872 self.ui.debug('WARNING: Opening non-existant file %s\n' % path) |
| 866 open_file = stash_exception_on_self(open_file) | 873 open_file = stash_exception_on_self(open_file) |
| 867 | 874 |
| 868 def aresamefiles(self, parentctx, childctx, files): | 875 def aresamefiles(self, parentctx, childctx, files): |
| 869 """Assuming all files exist in childctx and parentctx, return True | 876 """Assuming all files exist in childctx and parentctx, return True |
| 870 if none of them was changed in-between. | 877 if none of them was changed in-between. |
