* bug#38216: [PATCH] vc-hg: don't pass empty string to 'update' command
@ 2019-11-15 7:51 Andrii Kolomoiets
2019-11-15 8:14 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Andrii Kolomoiets @ 2019-11-15 7:51 UTC (permalink / raw)
To: 38216
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Hello,
Passing empty string to 'update' command leads to error starting from
mercurial 4.6.
mercurial 4.5.3:
hg up ""
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
mercurial 4.6:
hg up ""
abort: 00changelog.i@: ambiguous identifier!
Empty revision name is used in vc-retrieve-tag to update to the latest
revision but let's pass nil instead of empty string to 'hg update'.
[-- Attachment #2: 0001-lisp-vc-vc-hg.el-Don-t-pass-empty-string-to-hg-updat.patch --]
[-- Type: application/octet-stream, Size: 874 bytes --]
From 96bf1510c280422f4e3602f2a95980b6e2308eaa Mon Sep 17 00:00:00 2001
From: Andrii Kolomoiets <andreyk.mad@gmail.com>
Date: Fri, 15 Nov 2019 09:34:51 +0200
Subject: [PATCH] lisp/vc/vc-hg.el: Don't pass empty string to hg update
* lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Don't pass empty name to `hg update`.
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 16e5dd6db0..48a7838684 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -578,7 +578,7 @@ vc-hg-create-tag
(defun vc-hg-retrieve-tag (dir name _update)
"Retrieve the version tagged by NAME of all registered files at or below DIR."
(let ((default-directory dir))
- (vc-hg-command nil 0 nil "update" name)
+ (vc-hg-command nil 0 nil "update" (unless (string-empty-p name) name))
;; TODO: update *vc-change-log* buffer so can see @ if --graph
))
--
2.15.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-15 9:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-15 7:51 bug#38216: [PATCH] vc-hg: don't pass empty string to 'update' command Andrii Kolomoiets
2019-11-15 8:14 ` Lars Ingebrigtsen
2019-11-15 8:59 ` martin rudalics
2019-11-15 9:05 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.