unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61320: 28.2; `vc-cvs-parse-root' returns wrong results
@ 2023-02-06 12:43 Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-05-12 20:48 ` bug#61320: " Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 3+ messages in thread
From: Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-06 12:43 UTC (permalink / raw)
  To: 61320

This reproduces also in master.

Not sure why nobody has reported this.  Most likely because the current
callers of `vc-cvs-parse-root' care only about some aspects of the
actual result of `vc-cvs-parse-root'.

$ emacs -Q

In scratch buffer evaluate the following (specification of Ctrl-J
omitted for clarity):

(load-library "vc-cvs")
t

;; this one is correct in the sense that 3rd element of the list is nil
;; (making it a local root for `vc-cvs-repository-hostname'), but
;; probably is not what the author has intended:
(vc-cvs-parse-root ":local:/var/lib/cvs")
("local" nil nil "var:/lib/cvs")

;; but this one is completely broken:
(vc-cvs-parse-root "/var/lib/cvs")
("ext" nil "var" "/lib/cvs")

There might be different fixes, but IMHO the regexp used in function
`vc-cvs-parse-uhp' should be anchored to beginning of line or string:

  "\\`\\([^/]+\\)\\(/.*\\)"







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-13  6:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 12:43 bug#61320: 28.2; `vc-cvs-parse-root' returns wrong results Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-12 20:48 ` bug#61320: " Farblos via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-13  6:04   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).