[Pkg-bazaar-commits] ./bzr-builddeb/trunk r228: Merge Jelmer's change to make ~svn123 version numbers grab the corresponding revision
James Westby
jw+debian at jameswestby.net
Thu May 15 15:11:55 UTC 2008
------------------------------------------------------------
revno: 228
committer: James Westby <jw+debian at jameswestby.net>
branch nick: trunk
timestamp: Thu 2008-05-15 16:11:55 +0100
message:
Merge Jelmer's change to make ~svn123 version numbers grab the corresponding revision
I have added support for ~svnX as well.
modified:
debian/changelog
tests/test_config.py
tests/test_util.py
util.py
------------------------------------------------------------
revno: 193.1.4
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2007-12-03 14:10:13 +0100
message:
Support building svn snapshots.
modified:
tests/test_config.py
tests/test_util.py
util.py
------------------------------------------------------------
revno: 226.2.1
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: upstream
timestamp: Thu 2008-05-15 15:04:43 +0200
message:
Merge support for svn snapshots.
modified:
debian/changelog
tests/test_config.py
tests/test_util.py
util.py
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-03-19 21:33:05 +0000
+++ b/debian/changelog 2008-05-15 13:04:43 +0000
@@ -1,3 +1,9 @@
+bzr-builddeb (0.94) unstable; urgency=low
+
+ * Support building against snapshots from Subversion branches.
+
+ -- Jelmer Vernooij <jelmer at samba.org> Thu, 15 May 2008 15:03:57 +0200
+
bzr-builddeb (0.93) unstable; urgency=low
[ Arnaud Fontaine ]
=== modified file 'tests/test_config.py'
--- a/tests/test_config.py 2008-03-05 17:00:51 +0000
+++ b/tests/test_config.py 2008-05-15 13:04:43 +0000
@@ -87,5 +87,7 @@
self.assertEqual(self.config.export_upstream_revision, 'tag:upstream-0.2')
self.config.set_version(Version('0.2~bzr300'))
self.assertEqual(self.config.export_upstream_revision, '300')
+ self.config.set_version(Version('0.2~svn200'))
+ self.assertEqual(self.config.export_upstream_revision, 'svn:200')
# vim: ts=2 sts=2 sw=2
=== modified file 'tests/test_util.py'
--- a/tests/test_util.py 2008-03-05 17:00:51 +0000
+++ b/tests/test_util.py 2008-05-15 15:11:55 +0000
@@ -172,4 +172,10 @@
def test_non_numeric_snapshot(self):
self.assertEquals(None, get_snapshot_revision("0.4.4~bzra"))
+ def test_with_svn_snapshot(self):
+ self.assertEquals("svn:4242", get_snapshot_revision("0.4.4~svn4242"))
+
+ def test_with_svn_snapshot_plus(self):
+ self.assertEquals("svn:2424", get_snapshot_revision("0.4.4+svn2424"))
+
# vim: ts=2 sts=2 sw=2
=== modified file 'util.py'
--- a/util.py 2008-03-05 17:00:51 +0000
+++ b/util.py 2008-05-15 15:11:55 +0000
@@ -91,8 +91,11 @@
def get_snapshot_revision(upstream_version):
"""Return the upstream revision specifier if specified in the upstream version or None. """
match = re.search("~bzr([0-9]+)$", upstream_version)
- if match is None:
- return None
- return match.groups()[0]
+ if match is not None:
+ return match.groups()[0]
+ match = re.search("(?:~|\\+)svn([0-9]+)$", upstream_version)
+ if match is not None:
+ return "svn:%s" % match.groups()[0]
+ return None
# vim: ts=2 sts=2 sw=2
More information about the Pkg-bazaar-commits
mailing list