all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Santiago Payà i Miralta" <santiagopim@gmail.com>
To: 17454@debbugs.gnu.org
Subject: bug#17454: lisp/vc/vc-hg.el: vc-hg-unregister fixed with the hg forget command.
Date: Sat, 10 May 2014 17:37:49 +0200	[thread overview]
Message-ID: <CABmqNJVJHq+yA23jxJuEHngUzynD0c02ZMNcA1jnMvsmjn1CuA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2325 bytes --]

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@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@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

[-- Attachment #2: Type: text/html, Size: 5892 bytes --]

             reply	other threads:[~2014-05-10 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-10 15:37 Santiago Payà i Miralta [this message]
2014-05-11  2:01 ` bug#17454: lisp/vc/vc-hg.el: vc-hg-unregister fixed with the hg forget command Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABmqNJVJHq+yA23jxJuEHngUzynD0c02ZMNcA1jnMvsmjn1CuA@mail.gmail.com \
    --to=santiagopim@gmail.com \
    --cc=17454@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.