Mercurial > hgsubversion
changeset 399:94f7e8c53c36
tags: end branch while tagging instead of creating extra changeset
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 10 Jun 2009 09:35:45 +0200 |
parents | f13dd964d10c |
children | 09625f3abdb0 |
files | hgsubversion/hg_delta_editor.py tests/test_tags.py |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/hg_delta_editor.py +++ b/hgsubversion/hg_delta_editor.py @@ -584,6 +584,8 @@ class HgChangeReceiver(delta.Editor): extra = util.build_extra(rev.revnum, b, self.uuid, self.subdir) if not self.usebranchnames: extra.pop('branch', None) + if b in endbranches: + extra['close'] = 1 ctx = context.memctx(self.repo, (parent.node(), node.nullid), rev.message or ' ', @@ -596,7 +598,9 @@ class HgChangeReceiver(delta.Editor): if (rev.revnum, b) not in self.revmap: self.add_to_revmap(rev.revnum, b, new) if b in endbranches: - endbranches[b] = new + endbranches.pop(b) + bname = b or 'default' + self.ui.status('Marked branch %s as closed.\n' % bname) def commit_current_delta(self, tbdelta): if hasattr(self, '_exception_info'): #pragma: no cover
--- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -56,7 +56,7 @@ class TestTags(test_util.TestBase): stupid=stupid) branches = set(repo[h] for h in repo.heads(closed=False)) self.assert_('dummy' not in branches) - self.assertEqual(repo['dummy'], repo['tip'].parents()[0].parents()[0]) + self.assertEqual(repo['dummy'], repo['tip'].parents()[0]) extra = repo['tip'].extra().copy() extra.pop('convert_revision', None) self.assertEqual(extra, {'branch': 'dummy', 'close': '1'})