From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#4179: vc-merge with svn: syntax error in revision arg. Date: Fri, 27 Aug 2021 05:06:50 +0200 Message-ID: <878s0nsi0l.fsf@gnus.org> References: <87my5ycpj3.fsf@urmel.duenenhof-wilhelm.de> <200908200259.n7K2x8sj004573@godzilla.ics.uci.edu> <200908261804.n7QI4vh7023115@godzilla.ics.uci.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27681"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Dieter Wilhelm , 4179@debbugs.gnu.org, Stefan Monnier , Dmitry Gutov To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 27 05:08:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJSDy-00071f-VD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Aug 2021 05:08:10 +0200 Original-Received: from localhost ([::1]:36648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJSDx-0006SS-1K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Aug 2021 23:08:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJSDq-0006Rj-NQ for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 23:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJSDq-0005cl-G0 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 23:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJSDq-0007FH-77 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2021 23:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Aug 2021 03:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4179 X-GNU-PR-Package: emacs Original-Received: via spool by 4179-submit@debbugs.gnu.org id=B4179.163003362627766 (code B ref 4179); Fri, 27 Aug 2021 03:08:02 +0000 Original-Received: (at 4179) by debbugs.gnu.org; 27 Aug 2021 03:07:06 +0000 Original-Received: from localhost ([127.0.0.1]:50896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJSCv-0007Dm-Qi for submit@debbugs.gnu.org; Thu, 26 Aug 2021 23:07:06 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:54468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJSCu-0007DI-42 for 4179@debbugs.gnu.org; Thu, 26 Aug 2021 23:07:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bu+DKgPjkoUpygyM7JNU5hUsaZ7b96TQ2fabTl4Y9DY=; b=I81rjhVcuVdtAVXjcG8fjAZAv2 tkfxsKXqzZMXXf5hcCzJ0jap2tvtM/ZCpNf7pGfKCPqbvvveHEWz1i8zRN94ai9GjwHfDOX3j2j+1 jphOdYuQYuwZGEw6hVtL6Up0iZnUG8TpNMF88CT+hXI6fghkFMVefL1EEE40pSAUG2aA=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJSCg-0001AL-Ku; Fri, 27 Aug 2021 05:06:55 +0200 In-Reply-To: <200908261804.n7QI4vh7023115@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Wed, 26 Aug 2009 11:04:57 -0700 (PDT)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212780 Archived-At: Dan Nicolaescu 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