diff options
author | Sam Steingold <sds@gnu.org> | 2002-04-09 17:13:51 +0000 |
---|---|---|
committer | Sam Steingold <sds@gnu.org> | 2002-04-09 17:13:51 +0000 |
commit | 93bcb353e7a47ddc123dfd709e69f5e5a69a2bde (patch) | |
tree | d47a471e7361514a3b34a59dd12fa6dd4327108e /lisp/vc-cvs.el | |
parent | 41bfcbee0dac6f522b21792fbde0fddb6c0ca62e (diff) | |
download | emacs-93bcb353e7a47ddc123dfd709e69f5e5a69a2bde.tar.gz |
(vc-cvs-valid-version-number-p): New function.
(vc-cvs-checkin): Use it.
Diffstat (limited to 'lisp/vc-cvs.el')
-rw-r--r-- | lisp/vc-cvs.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 5a92f8fa0f3..67c209eb31b 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> -;; $Id: vc-cvs.el,v 1.38 2002/03/28 14:27:30 spiegel Exp $ +;; $Id: vc-cvs.el,v 1.39 2002/04/08 13:38:48 sds Exp $ ;; This file is part of GNU Emacs. @@ -322,7 +322,7 @@ This is only possible if CVS is responsible for FILE's directory." (list vc-checkin-switches) vc-checkin-switches)) status) - (if (not rev) + (if (or (not rev) (vc-cvs-valid-version-number-p rev)) (setq status (apply 'vc-cvs-command nil 1 file "ci" (if rev (concat "-r" rev)) (concat "-m" comment) @@ -816,6 +816,10 @@ essential information." (and (string-match "^[a-zA-Z]" tag) (not (string-match "[^a-z0-9A-Z-_]" tag)))) +(defun vc-cvs-valid-version-number-p (tag) + "Return non-nil if TAG is a valid version number." + (and (string-match "^[0-9]" tag) + (not (string-match "[^0-9.]" tag)))) (defun vc-cvs-parse-sticky-tag (match-type match-tag) "Parse and return the sticky tag as a string. |