]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix vc-hg-rename-file on file names like ~/foo/bar
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Jan 2021 07:59:48 +0000 (08:59 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Jan 2021 07:59:48 +0000 (08:59 +0100)
* lisp/vc/vc-hg.el (vc-hg-rename-file): Use absolute file names,
because hg doesn't like getting file names like "~/foo/bar"
(bug#36932).

lisp/vc/vc-hg.el

index c4b82ab11eb677aa16290944447bbb59d5a9c8ac..1d163a64ab231007ff79e594088ffef3996f2acc 100644 (file)
@@ -1166,7 +1166,8 @@ hg binary."
 ;; Modeled after the similar function in vc-bzr.el
 (defun vc-hg-rename-file (old new)
   "Rename file from OLD to NEW using `hg mv'."
-  (vc-hg-command nil 0 new "mv" old))
+  (vc-hg-command nil 0 (expand-file-name new) "mv"
+                 (expand-file-name old)))
 
 (defun vc-hg-register (files &optional _comment)
   "Register FILES under hg. COMMENT is ignored."