Article View: gnu.emacs.bug
Article #88004a few minor fixes to VC lock-stealing code
From: Jonathan I. Kamens
Date: Sat, 13 Aug 1994 03:26
Date: Sat, 13 Aug 1994 03:26
69 lines
3511 bytes
3511 bytes
In GNU Emacs 19.25.2 of Fri Aug 12 1994 on gza-client1 (sparc-sun-sunos4.1.3)
The ChangeLog entry below explains the changes. This patch depends on
the patch I sent in earlier today for the same region of code.
Fri Aug 12 19:18:31 1994 Jonathan I. Kamens (jik@gza-client1)
* vc.el (vc-steal-lock): (1) Function should be
non-interactive, because it doesn't work when called directly
by the user. (2) Don't display revision "nil" when stealing
lock if revision is unknown. (3) Put "Stolen lock on <file>"
instead of just the file name in the Subject of the
notification message.
*** vc.el 1994/08/12 17:53:14 1.2
--- vc.el 1994/08/12 19:16:23
***************
*** 574,584 ****
(defun vc-steal-lock (file rev &optional owner)
"Steal the lock on the current workfile."
! (interactive)
! (let ((configuration (current-window-configuration)))
(if (not owner)
(setq owner (vc-locking-user file)))
! (if (not (y-or-n-p (format "Take the lock on %s:%s from %s? " file rev owner)))
(error "Steal cancelled"))
(pop-to-buffer (get-buffer-create "*VC-mail*"))
(setq default-directory (expand-file-name "~/"))
--- 574,587 ----
(defun vc-steal-lock (file rev &optional owner)
"Steal the lock on the current workfile."
! (let ((configuration (current-window-configuration))
! file-description)
(if (not owner)
(setq owner (vc-locking-user file)))
! (if rev
! (setq file-description (format "%s:%s" file rev))
! (setq file-description file))
! (if (not (y-or-n-p (format "Take the lock on %s from %s? " file-description owner)))
(error "Steal cancelled"))
(pop-to-buffer (get-buffer-create "*VC-mail*"))
(setq default-directory (expand-file-name "~/"))
***************
*** 585,595 ****
(auto-save-mode auto-save-default)
(mail-mode)
(erase-buffer)
! (mail-setup owner (format "%s:%s" file rev) nil nil nil
(list (list 'vc-finish-steal file rev configuration)))
(goto-char (point-max))
(insert
! (format "I stole the lock on %s:%s, " file rev)
(current-time-string)
".\n")
(message "Please explain why you stole the lock. Type C-c C-c when done.")))
--- 588,598 ----
(auto-save-mode auto-save-default)
(mail-mode)
(erase-buffer)
! (mail-setup owner (format "Stolen lock on %s" file-description) nil nil nil
(list (list 'vc-finish-steal file rev configuration)))
(goto-char (point-max))
(insert
! (format "I stole the lock on %s, " file-description)
(current-time-string)
".\n")
(message "Please explain why you stole the lock. Type C-c C-c when done.")))
Technical Details
Message-ID:
<199408121921.PAA13319@gza-client1.aktis.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!primenet!netnews.asu.edu !asuvax!cs.utexas.edu!convex!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cam.ov.COM!jikShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,f09e88526cc89293,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-13 06:23:59 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!primenet!netnews.asu.edu !asuvax!cs.utexas.edu!convex!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cam.ov.COM!jik From: jik@cam.ov.COM (Jonathan I. Kamens) Newsgroups: gnu.emacs.bug Subject: a few minor fixes to VC lock-stealing code Date: 12 Aug 1994 23:26:53 -0400 Organization: GNUs Not Usenet Lines: 70 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <199408121921.PAA13319@gza-client1.aktis.com>