# HG changeset patch # User Stefan Monnier # Date 1207229674 0 # Node ID 702b99dd7604437aeb6e7e9ce7ffe136f2f380df # Parent 7ec6308bd95a8e66c53cbc0b40b140e92b9a4a38 (vc-bzr-previous-revision, vc-bzr-next-revision): New funs. diff -r 7ec6308bd95a -r 702b99dd7604 lisp/ChangeLog --- 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 + + * vc-bzr.el (vc-bzr-previous-revision, vc-bzr-next-revision): New funs. + 2008-04-03 Chong Yidong * shell.el (shell-dynamic-complete-filename): New fun. diff -r 7ec6308bd95a -r 702b99dd7604 lisp/vc-bzr.el --- 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.