GNU bug report logs -
#4179
vc-merge with svn: syntax error in revision arg.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4179 in the body.
You can then email your comments to 4179 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4179
; Package
emacs
.
(Mon, 17 Aug 2009 17:40:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dieter Wilhelm <dieter <at> duenenhof-wilhelm.de>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 17 Aug 2009 17:40:08 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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 <at> gnu.org 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
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4179
; Package
emacs
.
(Thu, 20 Aug 2009 20:37:23 GMT)
Full text and
rfc822 format available.
Message #8 received at 4179 <at> emacsbugs.donarmstrong.com (full text, mbox):
Dieter Wilhelm <dieter <at> 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?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4179
; Package
emacs
.
(Tue, 25 Aug 2009 18:15:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 25 Aug 2009 18:15:05 GMT)
Full text and
rfc822 format available.
Message #13 received at 4179 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4179
; Package
emacs
.
(Wed, 26 Aug 2009 18:10:08 GMT)
Full text and
rfc822 format available.
Message #16 received at 4179 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> IRO.UMontreal.CA> 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-gnu-emacs <at> gnu.org
:
bug#4179
; Package
emacs
.
(Fri, 27 Aug 2021 03:08:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 4179 <at> debbugs.gnu.org (full text, mbox):
Dan Nicolaescu <dann <at> ics.uci.edu> writes:
> 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?
(I'm going through old bug reports that unfortunately weren't
resolved at the time.)
This code has changed a lot in the 12 years since this was discussed --
does anybody know whether the originally reported problem has been fixed
or not?
Also:
;; 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.
(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))))
;;;###autoload
(defun vc-branch-part (rev)
"Return the branch part of a revision number REV."
(let ((index (string-match "\\.[0-9]+\\'" rev)))
(when index
(substring rev 0 index))))
The comment there is wrong -- it's no longer used in vc.el. Perhaps
these two functions should be moved to vc-rcs.el (and renamed (with
obsolete aliases))? (They're only used in vc-rcs.el and vc-vcs.el.)
I've added Dmitry to the CCs; perhaps he has some comments.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 27 Aug 2021 03:08:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4179
; Package
emacs
.
(Fri, 27 Aug 2021 20:12:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 4179 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> (I'm going through old bug reports that unfortunately weren't
> resolved at the time.)
>
> This code has changed a lot in the 12 years since this was discussed --
> does anybody know whether the originally reported problem has been fixed
> or not?
Sorry, I can't tell, started that year with git (had to start...) and
lost sight of the svn issue.
Thank you for your detective work, though
Dieter
--
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4179
; Package
emacs
.
(Sun, 29 Aug 2021 00:51:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 4179 <at> debbugs.gnu.org (full text, mbox):
On 27.08.2021 06:06, Lars Ingebrigtsen wrote:
> Dan Nicolaescu <dann <at> ics.uci.edu> writes:
>
>> 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?
>
> (I'm going through old bug reports that unfortunately weren't
> resolved at the time.)
>
> This code has changed a lot in the 12 years since this was discussed --
> does anybody know whether the originally reported problem has been fixed
> or not?
Hard for me to say: it's SVN. Someone who has easy access to such a
server should try the original scenario.
But there have indeed been some changes, including commit d17bae903902.
Which mentions fixing "a layering violation that caused bad behavior
with SVN".
> Also:
>
> ;; 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.
> (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))))
>
> ;;;###autoload
> (defun vc-branch-part (rev)
> "Return the branch part of a revision number REV."
> (let ((index (string-match "\\.[0-9]+\\'" rev)))
> (when index
> (substring rev 0 index))))
>
> The comment there is wrong -- it's no longer used in vc.el. Perhaps
> these two functions should be moved to vc-rcs.el (and renamed (with
> obsolete aliases))? (They're only used in vc-rcs.el and vc-vcs.el.)
Yes, they should. Also, vc-merge should call (vc-find-backend-function
backend 'merge-file) instead of (vc-find-backend-function backend
'merge). They only seem equivalent for now by lucky accident. I'd do
that change myself now, but it's similarly hard for me to quickly test
any of the affected backends, and this operation is not covered by
vc-tests.el.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4179
; Package
emacs
.
(Sun, 29 Aug 2021 20:43:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 4179 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> Hard for me to say: it's SVN. Someone who has easy access to such a
> server should try the original scenario.
>
> But there have indeed been some changes, including commit
> d17bae903902. Which mentions fixing "a layering violation that caused
> bad behavior with SVN".
OK; I think we can close this bug report, then. (Now done.)
>> The comment there is wrong -- it's no longer used in vc.el. Perhaps
>> these two functions should be moved to vc-rcs.el (and renamed (with
>> obsolete aliases))? (They're only used in vc-rcs.el and vc-vcs.el.)
>
> Yes, they should.
Also done.
> Also, vc-merge should call (vc-find-backend-function
> backend 'merge-file) instead of (vc-find-backend-function backend
> 'merge). They only seem equivalent for now by lucky accident. I'd do
> that change myself now, but it's similarly hard for me to quickly test
> any of the affected backends, and this operation is not covered by
> vc-tests.el.
Perhaps open a new bug report for this and see whether anybody
volunteers to implement and test?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
4179 <at> debbugs.gnu.org and Dieter Wilhelm <dieter <at> duenenhof-wilhelm.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 29 Aug 2021 20:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4179
; Package
emacs
.
(Sun, 29 Aug 2021 21:10:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 4179 <at> debbugs.gnu.org (full text, mbox):
On 29.08.2021 23:42, Lars Ingebrigtsen wrote:
>> Also, vc-merge should call (vc-find-backend-function
>> backend 'merge-file) instead of (vc-find-backend-function backend
>> 'merge). They only seem equivalent for now by lucky accident. I'd do
>> that change myself now, but it's similarly hard for me to quickly test
>> any of the affected backends, and this operation is not covered by
>> vc-tests.el.
> Perhaps open a new bug report for this and see whether anybody
> volunteers to implement and test?
Filed bug#50258.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 27 Sep 2021 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.