Mercurial > hgsubversion
changeset 450:7ca49177991a
tags: Handle edits to edited tags.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 26 Jun 2009 10:34:32 -0500 |
parents | bda5b47ad2a2 |
children | e533e78f1b2f |
files | hgsubversion/svnmeta.py tests/fixtures/commit-to-tag.sh tests/fixtures/commit-to-tag.svndump tests/test_tags.py |
diffstat | 4 files changed, 34 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -313,9 +313,8 @@ class SVNMeta(object): tag = self.is_path_tag(self.remotename(branch)) if tag and tag in self.tags: ha = self.tags[tag] - r, br = self.parse_converted_revision(self.repo[ha].extra()['convert_revision']) - else: - r, br = self.get_parent_svn_branch_and_rev(number, branch) + return ha + r, br = self.get_parent_svn_branch_and_rev(number, branch) if r is not None: return self.revmap[r, br] return revlog.nullid
--- a/tests/fixtures/commit-to-tag.sh +++ b/tests/fixtures/commit-to-tag.sh @@ -47,6 +47,9 @@ echo not omega > branches/magic/omega echo not omega > tags/also-edit/omega svn ci -m 'edit both the tag and its source branch at the same time' +echo more stupidity > tags/also-edit/omega +svn ci -m 'Edit an edited tag.' + cd ../.. svnadmin dump temp/repo > commit-to-tag.svndump echo
--- a/tests/fixtures/commit-to-tag.svndump +++ b/tests/fixtures/commit-to-tag.svndump @@ -384,3 +384,31 @@ Text-content-md5: 9b26a47955b0778e131aae Content-length: 10 not omega + + +Revision-number: 13 +Prop-content-length: 122 +Content-length: 122 + +K 7 +svn:log +V 19 +Edit an edited tag. +K 10 +svn:author +V 5 +durin +K 8 +svn:date +V 27 +2009-06-26T15:28:20.055574Z +PROPS-END + +Node-path: tags/also-edit/omega +Node-kind: file +Node-action: change +Text-content-length: 15 +Text-content-md5: a8d56f18cc28a34d6fe2cee5291ac1cc +Content-length: 15 + +more stupidity
--- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -114,7 +114,7 @@ class TestTags(test_util.TestBase): repo[alsoedit].extra(), {'close': '1', 'branch': 'magic', - 'convert_revision': 'svn:af82cc90-c2d2-43cd-b1aa-c8a78449440a/tags/also-edit@12'}) + 'convert_revision': 'svn:af82cc90-c2d2-43cd-b1aa-c8a78449440a/tags/also-edit@13'}) self.assertEqual(alsoedit, repo.tags()['also-edit']) self.assertEqual(repo['also-edit'].manifest().keys(), ['beta',