[Pkg-bazaar-commits] ./bzr-builddeb/trunk r241: Support +bzr for snapshots as well as ~bzr.

Frank Chu fchu at example.com
Fri Jun 13 14:04:19 UTC 2008


------------------------------------------------------------
revno: 241
committer: Frank Chu <fchu at example.com>
branch nick: trunk
timestamp: Fri 2008-06-13 15:04:19 +0100
message:
  Support +bzr for snapshots as well as ~bzr.
modified:
  debian/changelog
  tests/test_util.py
  util.py
    ------------------------------------------------------------
    revno: 239.1.1
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Mon 2008-06-09 13:40:13 +0200
    message:
      Allow use of + before snapshot revisions.
    modified:
      tests/test_util.py
      util.py
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog	2008-05-29 23:52:48 +0000
+++ b/debian/changelog	2008-06-13 14:04:19 +0000
@@ -1,8 +1,9 @@
 bzr-builddeb (1.0) UNRELEASED; urgency=low
 
-  * NOT RELEASED YET.
+  [ Jelmer Vernooij ]
+  * Support +bzr for snapshots as well as ~bzr.
 
- -- James Westby <james.westby at canonical.com>  Fri, 30 May 2008 00:52:04 +0100
+ -- James Westby <james.westby at canonical.com>  Fri, 13 Jun 2008 15:03:53 +0100
 
 bzr-builddeb (0.95) unstable; urgency=low
 

=== modified file 'tests/test_util.py'
--- a/tests/test_util.py	2008-05-29 22:51:16 +0000
+++ b/tests/test_util.py	2008-06-09 11:40:13 +0000
@@ -167,6 +167,9 @@
   def test_with_snapshot(self):
     self.assertEquals("30", get_snapshot_revision("0.4.4~bzr30"))
 
+  def test_with_snapshot_plus(self):
+    self.assertEquals("30", get_snapshot_revision("0.4.4+bzr30"))
+
   def test_without_snapshot(self):
     self.assertEquals(None, get_snapshot_revision("0.4.4"))
 

=== modified file 'util.py'
--- a/util.py	2008-05-29 22:51:16 +0000
+++ b/util.py	2008-06-09 11:40:13 +0000
@@ -85,7 +85,7 @@
 
 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)
+  match = re.search("(?:~|\\+)bzr([0-9]+)$", upstream_version)
   if match is not None:
     return match.groups()[0]
   match = re.search("(?:~|\\+)svn([0-9]+)$", upstream_version)



More information about the Pkg-bazaar-commits mailing list