diff lisp/vc-bzr.el @ 93602:702b99dd7604

(vc-bzr-previous-revision, vc-bzr-next-revision): New funs.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 03 Apr 2008 13:34:34 +0000
parents c505d070db06
children 2b3d42806dcc
line wrap: on
line diff
--- a/lisp/vc-bzr.el	Thu Apr 03 13:16:13 2008 +0000
+++ b/lisp/vc-bzr.el	Thu Apr 03 13:34:34 2008 +0000
@@ -357,6 +357,16 @@
   "Always return nil, as Bzr cannot register explicit versions."
   nil)
 
+(defun vc-bzr-previous-revision (file rev)
+  (if (string-match "\\`[0-9]+\\'" rev)
+      (number-to-string (1- (string-to-number rev)))
+    (concat "before:" rev)))
+
+(defun vc-bzr-next-revision (file rev)
+  (if (string-match "\\`[0-9]+\\'" rev)
+      (number-to-string (1+ (string-to-number rev)))
+    (error "Don't know how to compute the next revision of %s" rev)))
+
 (defun vc-bzr-register (files &optional rev comment)
   "Register FILE under bzr.
 Signal an error unless REV is nil.