GNU bug report logs -
#4179
vc-merge with svn: syntax error in revision arg.
Previous Next
Full log
View this message in rfc822 format
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?
This bug report was last modified 3 years and 325 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.