GNU bug report logs - #17454
lisp/vc/vc-hg.el: vc-hg-unregister fixed with the hg forget command.

Previous Next

Package: emacs;

Reported by: Santiago Payà i Miralta <santiagopim <at> gmail.com>

Date: Sat, 10 May 2014 17:22:02 UTC

Severity: normal

Fixed in version 24.3.91

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17454 in the body.
You can then email your comments to 17454 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17454; Package emacs. (Sat, 10 May 2014 17:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Santiago Payà i Miralta <santiagopim <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 10 May 2014 17:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Santiago Payà i Miralta <santiagopim <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: lisp/vc/vc-hg.el: vc-hg-unregister fixed with the hg forget command.
Date: Sat, 10 May 2014 17:37:49 +0200
[Message part 1 (text/plain, inline)]
Hi emacs,

I wish to fix the lisp/vc/vc-hg.el (vc-hg-unregister) function with the hg
forget command.

Since Mercurial 1.3 (2009) "forget" shorthands "remove -Af".

As the forget help says forget mark the specified files so they will no
longer be tracked after the next commit. This only removes files from the
current branch, not from the entire project history, and it does not
delete them
from the working directory.

2014-05-17 Santiago Payà i Miralta <santiagopim <at> gmail.com>

        * lisp/vc/vc-hg.el (vc-hg-unregister):
        Fixed with the hg forget command.

From f38abf59917445fb96c2950e8880f3e40b896ecc Mon Sep 17 00:00:00 2001
From: Santiago Payà i Miralta <santiagopim <at> gmail.com>
Date: Sat, 10 May 2014 11:54:49 +0200
Subject: [PATCH] * lisp/vc/vc-hg.el (vc-hg-unregister): Fixed with the hg
 forget command.

Since Mercurial 1.3 (2009) "forget" shorthands "remove -Af".

Forget mark the specified files so they will no longer be tracked
after the next commit. This only removes files from the current
branch, not from the entire project history, and it does not delete
them from the working directory.
---
 lisp/vc/vc-hg.el |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index a53ed87..05b53a3 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -60,7 +60,7 @@
 ;; - responsible-p (file)                      OK
 ;; - could-register (file)                     OK
 ;; - receive-file (file rev)                   ?? PROBABLY NOT NEEDED
-;; - unregister (file)                         COMMENTED OUT, MAY BE
INCORRECT
+;; - unregister (file)                         OK
 ;; * checkin (files rev comment)               OK
 ;; * find-revision (file rev buffer)           OK
 ;; * checkout (file &optional editable rev)    OK
@@ -436,10 +436,9 @@ COMMENT is ignored."
              ;; registered.
          (error))))

-;; FIXME: This would remove the file. Is that correct?
-;; (defun vc-hg-unregister (file)
-;;   "Unregister FILE from hg."
-;;   (vc-hg-command nil nil file "remove"))
+(defun vc-hg-unregister (file)
+  "Unregister FILE from hg."
+  (vc-hg-command nil 0 file "forget"))

 (declare-function log-edit-extract-headers "log-edit" (headers string))

-- 
1.7.9.5
[Message part 2 (text/html, inline)]

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sun, 11 May 2014 02:02:01 GMT) Full text and rfc822 format available.

Notification sent to Santiago Payà i Miralta <santiagopim <at> gmail.com>:
bug acknowledged by developer. (Sun, 11 May 2014 02:02:03 GMT) Full text and rfc822 format available.

Message #10 received at 17454-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 17454-done <at> debbugs.gnu.org
Subject: Re: bug#17454: lisp/vc/vc-hg.el: vc-hg-unregister fixed with the hg
 forget command.
Date: Sat, 10 May 2014 22:01:37 -0400
Version: 24.3.91

Thank you; applied to emacs-24 branch.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Jun 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 317 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.