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

Previous Next

Package: emacs;

Reported by: Dieter Wilhelm <dieter <at> duenenhof-wilhelm.de>

Date: Mon, 17 Aug 2009 17:40:07 UTC

Severity: normal

Tags: moreinfo

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: Dieter Wilhelm <dieter <at> duenenhof-wilhelm.de>, Dmitry Gutov <dgutov <at> yandex.ru>, Stefan Monnier <monnier <at> IRO.UMontreal.CA>, 4179 <at> debbugs.gnu.org
Subject: bug#4179: vc-merge with svn: syntax error in revision arg.
Date: Fri, 27 Aug 2021 05:06:50 +0200
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




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.