Rev 785: Start working on revspec. in file:///data/jelmer/bzr-svn/revspec/

Jelmer Vernooij jelmer at samba.org
Tue Nov 6 21:17:51 GMT 2007


At file:///data/jelmer/bzr-svn/revspec/

------------------------------------------------------------
revno: 785
revision-id:jelmer at samba.org-20071106211748-ey87ehmncudxo8o6
parent: jelmer at samba.org-20071105215901-08x3gskddm2gvztj
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revspec
timestamp: Tue 2007-11-06 22:17:48 +0100
message:
  Start working on revspec.
added:
  revspec.py                     revspec.py-20071106211507-q4fz2en91yrmjjl8-1
=== added file 'revspec.py'
--- a/revspec.py	1970-01-01 00:00:00 +0000
+++ b/revspec.py	2007-11-06 21:17:48 +0000
@@ -0,0 +1,35 @@
+# Copyright (C) 2007 Jelmer Vernooij <jelmer at samba.org>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+"""Custom revision specifier for Subversion."""
+
+from bzrlib.revisionspec import SPEC_TYPES, RevisionSpec
+
+class RevisionSpec_svn(RevisionSpec):
+    """Selects a revision using a Subversion revision number."""
+    
+    prefix = 'svn:'
+
+    def _match_on(self, branch, revs):
+        pass
+
+    def needs_branch(self):
+        return True
+
+    def get_branch(self):
+        return None
+
+
+SPEC_TYPES.append(RevisionSpec_svn)




More information about the bazaar-commits mailing list