changeset 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 7ec6308bd95a
children 40e064117c8a
files lisp/ChangeLog lisp/vc-bzr.el
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Apr 03 13:16:13 2008 +0000
+++ b/lisp/ChangeLog	Thu Apr 03 13:34:34 2008 +0000
@@ -1,3 +1,7 @@
+2008-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc-bzr.el (vc-bzr-previous-revision, vc-bzr-next-revision): New funs.
+
 2008-04-03  Chong Yidong  <cyd@stupidchicken.com>
 
 	* shell.el (shell-dynamic-complete-filename): New fun.
--- 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.