[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4179: vc-merge with svn: syntax error in revision arg.
From: |
Dan Nicolaescu |
Subject: |
bug#4179: vc-merge with svn: syntax error in revision arg. |
Date: |
Wed, 19 Aug 2009 19:59:08 -0700 (PDT) |
Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
> Hi,
>
> when running `vc-merge' for a subversion controlled file (this happens
> also with Emacs 23.1.50 by the way) with an integer argument (I'd like
> to specify two svn revision numbers), I'm tumbling into this:
>
> svn: Syntax error in revision argument ':10'
>
> (What I'd like to submit to svn is this: svn merge -r '10:8' ...)
>
> vc-merge (in vc.el) thinks that an integer is a branch ID instead of a
> svn revision # because of the following function:
>
> (defun vc-branch-p (rev)
> "Return t if REV is a branch revision."
> (not (eq nil (string-match "\\`[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*\\'" rev))))
Good catch! This function is from the time when RCS style revision
numbers where the only thing supported, here's what the comment in the
code says:
;; functions that operate on RCS revision numbers. This code should
;; also be moved into the backends. It stays for now, however, since
;; it is used in code below.
Stefan, how would you go about making these functions backend specific:
(defun vc-trunk-p (rev)
(defun vc-branch-p (rev)
(defun vc-branch-part (rev)
(defun vc-minor-part (rev)
It seems to me that only `vc-branch-p' needs to be backend specific, the
rest are only used by RCS and CVS.
vc-default-{previous,next}-revision use them, but they can go into
vc-rcs (or vc-cvs) and make one use the other (there's a precedent,
vc-cvs-comment-history uses an RCS backend function...).
Do you see an elegant way of dealing with this?