From: Dan Nicolaescu <dann@ics.uci.edu>
To: Miles Bader <miles@gnu.org>
Cc: 2652@emacsbugs.donarmstrong.com
Subject: bug#2652: 23.0.91; wacky behavior of "v" command in *vc-dir* buffer
Date: Fri, 13 Mar 2009 09:22:10 -0700 (PDT) [thread overview]
Message-ID: <200903131622.n2DGMAZG024224@godzilla.ics.uci.edu> (raw)
In-Reply-To: <fc339e4a0903130049x796cb44fx51fb84b1bfe8aee6@mail.gmail.com> (Miles Bader's message of "Fri, 13 Mar 2009 16:49:26 +0900")
Miles Bader <miles@gnu.org> writes:
> On Fri, Mar 13, 2009 at 4:27 PM, Dan Nicolaescu <dann@ics.uci.edu> wrote:
> > Thanks.
> > The immediate cause of the problem is that
> > (vc-git-registered "/tmp/zonk/")
> > returns nil.
> >
> > vc-git-registered is called because vc-finish-log-entry does a
> > `vc-call'. `vc-call' tries to find the corresponding VC backend.
> >
> > Now, the VC backend should be know known at point when the log entry is
> > started, so there should be no need for the vc-call, vc-call-backend
> > could be used...
You can try this patch that passes down the VC backend.
Not tested beyond M-x byte-compile-file.
--- vc.el.~1.711.~ Thu Jan 8 14:24:05 2009
+++ vc.el Fri Mar 13 09:14:58 2009
@@ -1085,13 +1085,13 @@
(if (not ready-for-commit)
(message "No files remain to be committed")
(if (not verbose)
- (vc-checkin ready-for-commit)
+ (vc-checkin ready-for-commit backend)
(progn
(setq revision (read-string "New revision or backend: "))
(let ((vsym (intern (upcase revision))))
(if (member vsym vc-handled-backends)
(dolist (file files) (vc-transfer-file file vsym))
- (vc-checkin ready-for-commit revision))))))))
+ (vc-checkin ready-for-commit backend revision))))))))
;; locked by somebody else (locking VCSes only)
((stringp state)
;; In the old days, we computed the revision once and used it on
@@ -1327,7 +1327,7 @@
".\n")
(message "Please explain why you stole the lock. Type C-c C-c when done.")))
-(defun vc-checkin (files &optional rev comment initial-contents)
+(defun vc-checkin (files backend &optional rev comment initial-contents)
"Check in FILES.
The optional argument REV may be a string specifying the new revision
level (if nil increment the current level). COMMENT is a comment
@@ -1341,6 +1341,7 @@
Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
(when vc-before-checkin-hook
(run-hooks 'vc-before-checkin-hook))
+ (lexical-let ((backend backend))
(vc-start-logentry
files rev comment initial-contents
"Enter a change comment."
@@ -1356,13 +1357,13 @@
;; We used to change buffers to get local value of vc-checkin-switches,
;; but 'the' local buffer is not a well-defined concept for filesets.
(progn
- (vc-call checkin files rev comment)
+ (vc-call-backend backend 'checkin files rev comment)
(mapc 'vc-delete-automatic-version-backups files))
`((vc-state . up-to-date)
(vc-checkout-time . ,(nth 5 (file-attributes file)))
(vc-working-revision . nil)))
(message "Checking in %s...done" (vc-delistify files)))
- 'vc-checkin-hook))
+ 'vc-checkin-hook)))
;;; Additional entry points for examining version histories
@@ -2096,7 +2097,7 @@
(when (or move edited)
(vc-file-setprop file 'vc-state 'edited)
(vc-mode-line file)
- (vc-checkin file nil comment (stringp comment)))))
+ (vc-checkin file new-backend nil comment (stringp comment)))))
(defun vc-rename-master (oldmaster newfile templates)
"Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES."
next prev parent reply other threads:[~2009-03-13 16:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 23:58 bug#2652: 23.0.91; wacky behavior of "v" command in *vc-dir* buffer Miles Bader
2009-03-13 0:38 ` Dan Nicolaescu
2009-03-13 1:05 ` Miles Bader
2009-03-13 1:06 ` Miles Bader
2009-03-13 1:34 ` Dan Nicolaescu
2009-03-13 1:50 ` Miles Bader
2009-03-13 2:49 ` Miles Bader
2009-03-13 2:59 ` Miles Bader
2009-03-13 7:27 ` Dan Nicolaescu
2009-03-13 7:49 ` Miles Bader
2009-03-13 15:31 ` Dan Nicolaescu
2009-03-13 16:22 ` Dan Nicolaescu [this message]
2009-03-14 16:03 ` Dan Nicolaescu
2009-03-15 2:09 ` Stefan Monnier
2009-03-15 9:07 ` Dan Nicolaescu
2009-03-23 16:37 ` Dan Nicolaescu
2009-03-23 17:34 ` Stefan Monnier
2009-04-13 17:02 ` Dan Nicolaescu
2009-04-13 18:03 ` Stefan Monnier
2009-03-15 2:30 ` Miles Bader
2009-03-15 9:05 ` Dan Nicolaescu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200903131622.n2DGMAZG024224@godzilla.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=2652@emacsbugs.donarmstrong.com \
--cc=miles@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 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).