GNU bug report logs - #4179
vc-merge with svn: syntax error in revision arg.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dieter Wilhelm <dieter@HIDDEN>; dated Mon, 17 Aug 2009 17:40:07 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 4179@HIDDEN:


Received: (at 4179) by emacsbugs.donarmstrong.com; 26 Aug 2009 18:05:23 +0000
From dann@HIDDEN Wed Aug 26 11:05:22 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7QI5LdT010282
	for <4179@HIDDEN>; Wed, 26 Aug 2009 11:05:22 -0700
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7QI4wuj023207;
	Wed, 26 Aug 2009 11:04:58 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7QI4vh7023115;
	Wed, 26 Aug 2009 11:04:57 -0700 (PDT)
Date: Wed, 26 Aug 2009 11:04:57 -0700 (PDT)
Message-Id: <200908261804.n7QI4vh7023115@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: 4179 <at> debbugs.gnu.org,
        Dieter Wilhelm <dieter@HIDDEN>
Subject: Re: bug#4179: vc-merge with svn: syntax error in revision arg.
References: <87my5ycpj3.fsf@HIDDEN>
	<200908200259.n7K2x8sj004573@HIDDEN>
	<jwvzl9npyj6.fsf-monnier+emacsbugreports@HIDDEN>
X-Debbugs-No-Ack: yes
In-Reply-To: <jwvzl9npyj6.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Tue, 25 Aug 2009 14:06:58 -0400")
Lines: 52
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n7QI4wuj023207
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5,
	autolearn=disabled, ALL_TRUSTED -1.44)
X-ICS-MailScanner-From: dann@HIDDEN

Stefan Monnier <monnier@HIDDEN> writes:

  > > 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?
  > 
  > Move them to vc-rcs.

I did that.

  > > 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)
  > 
  > Not sure: for some backends (svn, bzr, darcs at least), they simply
  > don't make any sense.
  > 
  > > It seems to me that only `vc-branch-p' needs to be backend specific, the
  > > rest are only used by RCS and CVS.
  > 
  > That sounds right.

Also moved + renamed vc-trunk-p and vc-minor-part to vc-rcs.el, they are
only used in that file now.

All the above turned out to be a good cleanup, but unfortunately
not necessarily related to the problem in this bug report.

We have this code in `vc-merge'

    (if (string= first-revision "")
        (setq status (vc-call-backend backend 'merge-news file))
      (if (not (vc-find-backend-function backend 'merge))
        (error "Sorry, merging is not implemented for %s" backend)
        (if (not (vc-branch-p first-revision))
            (setq second-revision
                    (read-string "Second revision: "
                         (concat (vc-branch-part first-revision) ".")))
           ;; We want to merge an entire branch.  Set revisions
           ;; accordingly, so that vc-BACKEND-merge understands us.
           (setq second-revision first-revision)
           ;; first-revision must be the starting point of the branch
          (setq first-revision (vc-branch-part first-revision)))

`vc-branch-p' can be made VC backend specific.
But what should we do with `vc-branch-part'?
What should be the new structure of this code?



Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4179; Package emacs. Full text available.

Message received at 4179@HIDDEN:


Received: (at 4179) by emacsbugs.donarmstrong.com; 25 Aug 2009 18:07:04 +0000
From monnier@HIDDEN Tue Aug 25 11:07:04 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.3 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7PI720j005752
	for <4179@HIDDEN>; Tue, 25 Aug 2009 11:07:03 -0700
Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n7PI6wq0029092;
	Tue, 25 Aug 2009 14:06:58 -0400
Received: by faina.iro.umontreal.ca (Postfix, from userid 20848)
	id 7ADE73A06B; Tue, 25 Aug 2009 14:06:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Dan Nicolaescu <dann@HIDDEN>
Cc: Dieter Wilhelm <dieter@HIDDEN>,
        4179 <at> debbugs.gnu.org
Subject: Re: bug#4179: vc-merge with svn: syntax error in revision arg.
Message-ID: <jwvzl9npyj6.fsf-monnier+emacsbugreports@HIDDEN>
References: <87my5ycpj3.fsf@HIDDEN>
	<200908200259.n7K2x8sj004573@HIDDEN>
Date: Tue, 25 Aug 2009 14:06:58 -0400
In-Reply-To: <200908200259.n7K2x8sj004573@HIDDEN> (Dan
	Nicolaescu's message of "Wed, 19 Aug 2009 19:59:08 -0700 (PDT)")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3348=0

> 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)

Not sure: for some backends (svn, bzr, darcs at least), they simply
don't make any sense.

> It seems to me that only `vc-branch-p' needs to be backend specific, the
> rest are only used by RCS and CVS.

That sounds right.

> 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?

Move them to vc-rcs.


        Stefan



Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4179; Package emacs. Full text available.

Message received at 4179@HIDDEN:


Received: (at 4179) by emacsbugs.donarmstrong.com; 20 Aug 2009 02:59:25 +0000
From dann@HIDDEN Wed Aug 19 19:59:25 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7K2xOec016536
	for <4179@HIDDEN>; Wed, 19 Aug 2009 19:59:25 -0700
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7K2x9hU015564;
	Wed, 19 Aug 2009 19:59:09 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7K2x8sj004573;
	Wed, 19 Aug 2009 19:59:08 -0700 (PDT)
Date: Wed, 19 Aug 2009 19:59:08 -0700 (PDT)
Message-Id: <200908200259.n7K2x8sj004573@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Dieter Wilhelm <dieter@HIDDEN>
Cc: 4179 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#4179: vc-merge with svn: syntax error in revision arg.
References: <87my5ycpj3.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
In-Reply-To: <87my5ycpj3.fsf@HIDDEN> (Dieter Wilhelm's
	message of "Mon, 17 Aug 2009 19:34:56 +0200")
Lines: 43
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n7K2x9hU015564
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.363,
	required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08)
X-ICS-MailScanner-From: dann@HIDDEN

Dieter Wilhelm <dieter@HIDDEN> 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?



Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4179; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 17 Aug 2009 17:35:17 +0000
From dieter@HIDDEN Mon Aug 17 10:35:16 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7HHZEkU029996
	for <submit@HIDDEN>; Mon, 17 Aug 2009 10:35:16 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Md670-0007QF-E6
	for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2009 13:35:14 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Md66v-0007OD-EF
	for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2009 13:35:14 -0400
Received: from [199.232.76.173] (port=42549 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Md66v-0007O8-80
	for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2009 13:35:09 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:53232)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <dieter@HIDDEN>)
	id 1Md66u-0001aj-Lz
	for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2009 13:35:09 -0400
Received: from urmel.duenenhof-wilhelm.de (p54A70CCE.dip0.t-ipconnect.de [84.167.12.206])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0MKsym-1Md66q2KUS-000la3; Mon, 17 Aug 2009 19:35:04 +0200
Received: from dieter by urmel.duenenhof-wilhelm.de with local (Exim 4.69)
	(envelope-from <dieter@HIDDEN>)
	id 1Md66n-00046Q-Vg
	for bug-gnu-emacs@HIDDEN; Mon, 17 Aug 2009 19:35:01 +0200
To: bug-gnu-emacs@HIDDEN
Subject: vc-merge with svn: syntax error in revision arg.
From: Dieter Wilhelm <dieter@HIDDEN>
Date: Mon, 17 Aug 2009 19:34:56 +0200
Message-ID: <87my5ycpj3.fsf@HIDDEN>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Provags-ID: V01U2FsdGVkX1+ZA95eQghraRwOsN7qhfrF18mb4POFz97KQ+Z
 4NLPxX+uHQUz6mssIsngQq93isfuts8gkd6aVnxt3Jo0VqGl+I
 mlpOxGgdLZqXkSMHHK/Iw==
X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized.


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@HIDDEN mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
------------------------------------------------------------

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))))

Thanks for your good work

       Dieter

------------------------------------------------------------
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.2/etc/DEBUG for instructions.


In GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-09 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  display-time-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <f4> C-x 
C-f d i s c C-r C-s C-s <return> y C-x v l C-x v m 
1 0 <return> M-x r e p o <tab> r t <tab> <return>

Recent messages:
Loading mule-util...done
Marking holidays...done
Marking diary entries...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Please type y, n, or !: 
Running svn in the background... done
Loading log-view...done
vc-do-command: Running svn...FAILED (status 1)
Making completion list...
Loading emacsbug...done




Acknowledgement sent to Dieter Wilhelm <dieter@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4179; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.