unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Cc: 4179@emacsbugs.donarmstrong.com
Subject: bug#4179: vc-merge with svn: syntax error in revision arg.
Date: Wed, 19 Aug 2009 19:59:08 -0700 (PDT)	[thread overview]
Message-ID: <200908200259.n7K2x8sj004573@godzilla.ics.uci.edu> (raw)
In-Reply-To: <87my5ycpj3.fsf@urmel.duenenhof-wilhelm.de> (Dieter Wilhelm's message of "Mon, 17 Aug 2009 19:34:56 +0200")

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?





  reply	other threads:[~2009-08-20  2:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 17:34 bug#4179: vc-merge with svn: syntax error in revision arg Dieter Wilhelm
2009-08-20  2:59 ` Dan Nicolaescu [this message]
2009-08-25 18:06   ` Stefan Monnier
2009-08-26 18:04     ` Dan Nicolaescu
2021-08-27  3:06       ` Lars Ingebrigtsen
2021-08-27 20:11         ` H. Dieter Wilhelm
2021-08-29  0:50         ` Dmitry Gutov
2021-08-29 20:42           ` Lars Ingebrigtsen
2021-08-29 21:09             ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908200259.n7K2x8sj004573@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=4179@emacsbugs.donarmstrong.com \
    --cc=dieter@duenenhof-wilhelm.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).