From 882e82db4d8521110941ea9bb30dc9d70c1919d6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 3 Apr 2008 13:34:34 +0000 Subject: [PATCH] (vc-bzr-previous-revision, vc-bzr-next-revision): New funs. --- lisp/ChangeLog | 4 ++++ lisp/vc-bzr.el | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38d8f10f87..2f11907944 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 686dd1db65..c2a67091ec 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -357,6 +357,16 @@ If any error occurred in running `bzr status', then return nil." "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. -- 2.39.2