From unknown Sat Jun 21 03:07:37 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5290: vc-bzr: improve support for shelves Reply-To: Dan Nicolaescu , 5290@debbugs.gnu.org Mail-Followup-To: Dan Nicolaescu , 5290@debbugs.gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jan 2010 04:17:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5290 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@debbugs.gnu.org id=B.126240581018151 (code B ref -1); Sat, 02 Jan 2010 04:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jan 2010 04:16:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQvQ1-0004ii-LN for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:49 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQvPz-0004id-95 for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:47 -0500 Received: from mx10.gnu.org ([199.232.76.166]:39128) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQvPw-00065w-08 for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NQvPu-0001K9-7K for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:54753) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQvPu-0001K5-21 for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQvPt-0005Iq-Mc for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQvPp-00058Q-HP for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:41 -0500 Received: from [199.232.76.173] (port=47837 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQvPp-00057z-A2 for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:37 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:40395) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQvPp-0001Bg-3v for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:37 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o024ErvD026391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 1 Jan 2010 20:14:53 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o024EqJP005228; Fri, 1 Jan 2010 20:14:52 -0800 (PST) Date: Fri, 1 Jan 2010 20:14:52 -0800 (PST) Message-Id: <201001020414.o024EqJP005228@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Lines: 103 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o024ErvD026391 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_BZ 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) The latest bzr has support for "unshelve --keep" (implemented as a result of a discussion on emacs-devel). That makes the shelves much more usable. The patch below add support for that option, and for creating snapshots of the tree as a shelf. Given that it's not a bug fix this would need a maintainer approval to get in 23.2 at this point... Index: vc-bzr.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v retrieving revision 1.94 diff -u -3 -p -u -p -r1.94 vc-bzr.el --- vc-bzr.el 9 Dec 2009 06:04:12 -0000 1.94 +++ vc-bzr.el 2 Jan 2010 03:58:42 -0000 @@ -722,7 +733,9 @@ stream. Standard error output is discar (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point) ;; (define-key map "=" 'vc-bzr-shelve-show-at-point) ;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point) - (define-key map "A" 'vc-bzr-shelve-apply-at-point) + (define-key map "A" 'vc-bzr-shelve-apply-and-keep-at-point) + (define-key map "P" 'vc-bzr-shelve-apply-at-point) + (define-key map "S" 'vc-bzr-shelve-snapshot) map)) (defvar vc-bzr-shelve-menu-map @@ -731,8 +744,11 @@ stream. Standard error output is discar '(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point :help "Delete the current shelf")) (define-key map [ap] - '(menu-item "Apply shelf" vc-bzr-shelve-apply-at-point - :help "Apply the current shelf")) + '(menu-item "Apply and keep shelf" vc-bzr-shelve-apply-and-keep-at-point + :help "Apply the current shelf and keep it")) + (define-key map [po] + '(menu-item "Apply and remove shelf (pop)" vc-bzr-shelve-apply-at-point + :help "Apply the current shelf and remove it")) ;; (define-key map [sh] ;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point ;; :help "Show the contents of the current shelve")) @@ -740,6 +756,9 @@ stream. Standard error output is discar (defvar vc-bzr-extra-menu-map (let ((map (make-sparse-keymap))) + (define-key map [bzr-sn] + '(menu-item "Shelve a snapshot" vc-bzr-shelve-snapshot + :help "Shelve the current state of the tree and keep the current state")) (define-key map [bzr-sh] '(menu-item "Shelve..." vc-bzr-shelve :help "Shelve changes")) @@ -790,7 +809,7 @@ stream. Standard error output is discar (propertize x 'face 'font-lock-variable-name-face 'mouse-face 'highlight - 'help-echo "mouse-3: Show shelve menu\nA: Apply shelf\nC-k: Delete shelf" + 'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf\nS: Snapshot to a shelf\nC-k: Delete shelf" 'keymap vc-bzr-shelve-map)) shelve "\n")) (concat @@ -820,11 +839,28 @@ stream. Standard error output is discar ;; (pop-to-buffer (current-buffer))) (defun vc-bzr-shelve-apply (name) - "Apply shelve NAME." - (interactive "sApply shelf: ") + "Apply shelve NAME and remove it afterwards." + (interactive "sApply (and remove) shelf: ") (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name) (vc-resynch-buffer (vc-bzr-root default-directory) t t)) +(defun vc-bzr-shelve-apply-and-keep (name) + "Apply shelve NAME and keep it afterwards." + (interactive "sApply (and keep) shelf: ") + (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" "--keep" name) + (vc-resynch-buffer (vc-bzr-root default-directory) t t)) + +(defun vc-bzr-shelve-snapshot () + "Create a stash with the current tree state." + (interactive) + (vc-bzr-command "shelve" nil 0 nil "--all" "-m" + (let ((ct (current-time))) + (concat + (format-time-string "Snapshot on %Y-%m-%d" ct) + (format-time-string " at %H:%M" ct)))) + (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" "--keep") + (vc-resynch-buffer (vc-bzr-root default-directory) t t)) + (defun vc-bzr-shelve-list () (with-temp-buffer (vc-bzr-command "shelve" (current-buffer) 1 nil "--list" "-q") @@ -857,6 +893,10 @@ stream. Standard error output is discar (interactive) (vc-bzr-shelve-apply (vc-bzr-shelve-get-at-point (point)))) +(defun vc-bzr-shelve-apply-and-keep-at-point () + (interactive) + (vc-bzr-shelve-apply-and-keep (vc-bzr-shelve-get-at-point (point)))) + (defun vc-bzr-shelve-menu (e) (interactive "e") (vc-dir-at-event e (popup-menu vc-bzr-shelve-menu-map e))) From unknown Sat Jun 21 03:07:37 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5290: vc-bzr: improve support for shelves Reply-To: Stefan Monnier , 5290@debbugs.gnu.org Mail-Followup-To: Stefan Monnier , 5290@debbugs.gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jan 2010 19:21:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5290 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5290-submit@debbugs.gnu.org id=B5290.126246000420942 (code B ref 5290); Sat, 02 Jan 2010 19:21:02 +0000 Received: (at 5290) by debbugs.gnu.org; 2 Jan 2010 19:20:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NR9W8-0005Rj-Bm for submit@debbugs.gnu.org; Sat, 02 Jan 2010 14:20:04 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NR9W6-0005RL-Qp for 5290@debbugs.gnu.org; Sat, 02 Jan 2010 14:20:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0EAKcrP0tFxIrG/2dsb2JhbACBRdADhDEEiimDCQ X-IronPort-AV: E=Sophos;i="4.47,489,1257138000"; d="scan'208";a="52773797" Received: from 69-196-138-198.dsl.teksavvy.com (HELO pastel.home) ([69.196.138.198]) by ironport2-out.pppoe.ca with ESMTP; 02 Jan 2010 14:19:57 -0500 Received: by pastel.home (Postfix, from userid 20848) id CF4F7846A; Sat, 2 Jan 2010 14:19:57 -0500 (EST) From: Stefan Monnier To: Dan Nicolaescu Message-ID: References: <201001020414.o024EqJP005228@godzilla.ics.uci.edu> Date: Sat, 02 Jan 2010 14:19:57 -0500 In-Reply-To: <201001020414.o024EqJP005228@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Fri, 1 Jan 2010 20:14:52 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -0.1 (/) Cc: 5290@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.1 (-) > Given that it's not a bug fix this would need a maintainer approval to > get in 23.2 at this point... Let's keep it for later, Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 19 20:40:54 2010 Received: (at control) by debbugs.gnu.org; 20 Jan 2010 01:40:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXPYz-0007Wd-5s for submit@debbugs.gnu.org; Tue, 19 Jan 2010 20:40:53 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXPYl-0007WW-Uj for control@debbugs.gnu.org; Tue, 19 Jan 2010 20:40:52 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NXPYi-0007Sl-Bs; Tue, 19 Jan 2010 20:40:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19286.24340.350706.582414@gargle.gargle.HOWL> Date: Tue, 19 Jan 2010 20:40:36 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: cyan X-Ran: 8WU:4P)DBN*0i&7=5k?sw9O_ List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) close 2951 tags 4206 moreinfo tags 3098 patch tags 2499 patch tags 5297 patch tags 5290 patch tags 1975 patch tags 4470 patch tags 5055 patch tags 3541 patch tags 2527 patch tags 5119 patch tags 2404 patch From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 19:13:46 2010 Received: (at control) by debbugs.gnu.org; 28 Jan 2010 00:13:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NaI14-0003WI-8V for submit@debbugs.gnu.org; Wed, 27 Jan 2010 19:13:46 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NaI12-0003WB-1C for control@debbugs.gnu.org; Wed, 27 Jan 2010 19:13:44 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NaI0y-0002kj-9B; Wed, 27 Jan 2010 19:13:40 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19296.54964.237486.393967@fencepost.gnu.org> Date: Wed, 27 Jan 2010 19:13:40 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: jqeI@9]N2j9L=T5y{46XM$yis^=8-t%A[c3H.k}5+~~"#Nf)E5)8*?XxH+0T%:q./m!M*2 X-Debbugs-No-Ack: yes X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.9 (----) tags 5032 moreinfo reassign 5032 emacs,w32 reassign 5040 emacs,w32 severity 5042 wishlist reassign 5074 emacs,w32 severity 5105 minor tags 5173 patch severity 5183 minor severity 5184 minor submitter 5195 monnier@iro.umontreal.ca unarchive 5227 unmerge 5227 tags 5251 patch severity 5290 wishlist reassign 5299 emacs,w32 tags 5326 patch reopen 5336 severity 5336 serious retitle 5336 DOC file is arch dependent reassign 5349 emacs,ns severity 5433 wishlist close 5456 reassign 5464 emacs,w32 reassign 5465 emacs,w32 reassign 5480 emacs,gnus reassign 5482 emacs,w32 reassign 5484 emacs,etags tags 5484 patch From unknown Sat Jun 21 03:07:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dan Nicolaescu Subject: bug#5290: closed (Re: bug#5290: vc-bzr: improve support for shelves) Message-ID: References: <201001020414.o024EqJP005228@godzilla.ics.uci.edu> X-Gnu-PR-Message: they-closed 5290 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 5290@debbugs.gnu.org Date: Thu, 24 Jun 2010 02:34:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1277346842-25238-1" This is a multi-part message in MIME format... ------------=_1277346842-25238-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #5290: vc-bzr: improve support for shelves which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 5290@debbugs.gnu.org. --=20 5290: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5290 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1277346842-25238-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5290-done) by debbugs.gnu.org; 24 Jun 2010 02:33:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORcFh-0006Yl-Dw for submit@debbugs.gnu.org; Wed, 23 Jun 2010 22:33:17 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORcFg-0006Yg-Bm for 5290-done@debbugs.gnu.org; Wed, 23 Jun 2010 22:33:16 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1ORcFc-0008OZ-Kb; Wed, 23 Jun 2010 22:33:12 -0400 To: 5290-done@debbugs.gnu.org Subject: Re: bug#5290: vc-bzr: improve support for shelves From: Glenn Morris X-Spook: anarchy Taiwan Noriega PLO kibo fraud nuclear Marxist X-Ran: B;UG7;)wx:^Wn`Xp.8po@,FIe%6CPD;%B-z<)cLnpVN.|)f`H=j^!CQ_%J/R*DgyrSoSV? X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 23 Jun 2010 22:33:12 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 5290-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Looks like this was applied. ------------=_1277346842-25238-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Jan 2010 04:16:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQvQ1-0004ii-LN for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:49 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQvPz-0004id-95 for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:47 -0500 Received: from mx10.gnu.org ([199.232.76.166]:39128) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NQvPw-00065w-08 for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NQvPu-0001K9-7K for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:54753) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQvPu-0001K5-21 for submit@debbugs.gnu.org; Fri, 01 Jan 2010 23:16:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQvPt-0005Iq-Mc for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQvPp-00058Q-HP for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:41 -0500 Received: from [199.232.76.173] (port=47837 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQvPp-00057z-A2 for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:37 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:40395) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQvPp-0001Bg-3v for bug-gnu-emacs@gnu.org; Fri, 01 Jan 2010 23:16:37 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o024ErvD026391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 1 Jan 2010 20:14:53 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o024EqJP005228; Fri, 1 Jan 2010 20:14:52 -0800 (PST) Date: Fri, 1 Jan 2010 20:14:52 -0800 (PST) Message-Id: <201001020414.o024EqJP005228@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Subject: vc-bzr: improve support for shelves X-Debbugs-No-Ack: yes Lines: 103 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o024ErvD026391 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_BZ 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) The latest bzr has support for "unshelve --keep" (implemented as a result of a discussion on emacs-devel). That makes the shelves much more usable. The patch below add support for that option, and for creating snapshots of the tree as a shelf. Given that it's not a bug fix this would need a maintainer approval to get in 23.2 at this point... Index: vc-bzr.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v retrieving revision 1.94 diff -u -3 -p -u -p -r1.94 vc-bzr.el --- vc-bzr.el 9 Dec 2009 06:04:12 -0000 1.94 +++ vc-bzr.el 2 Jan 2010 03:58:42 -0000 @@ -722,7 +733,9 @@ stream. Standard error output is discar (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point) ;; (define-key map "=" 'vc-bzr-shelve-show-at-point) ;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point) - (define-key map "A" 'vc-bzr-shelve-apply-at-point) + (define-key map "A" 'vc-bzr-shelve-apply-and-keep-at-point) + (define-key map "P" 'vc-bzr-shelve-apply-at-point) + (define-key map "S" 'vc-bzr-shelve-snapshot) map)) (defvar vc-bzr-shelve-menu-map @@ -731,8 +744,11 @@ stream. Standard error output is discar '(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point :help "Delete the current shelf")) (define-key map [ap] - '(menu-item "Apply shelf" vc-bzr-shelve-apply-at-point - :help "Apply the current shelf")) + '(menu-item "Apply and keep shelf" vc-bzr-shelve-apply-and-keep-at-point + :help "Apply the current shelf and keep it")) + (define-key map [po] + '(menu-item "Apply and remove shelf (pop)" vc-bzr-shelve-apply-at-point + :help "Apply the current shelf and remove it")) ;; (define-key map [sh] ;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point ;; :help "Show the contents of the current shelve")) @@ -740,6 +756,9 @@ stream. Standard error output is discar (defvar vc-bzr-extra-menu-map (let ((map (make-sparse-keymap))) + (define-key map [bzr-sn] + '(menu-item "Shelve a snapshot" vc-bzr-shelve-snapshot + :help "Shelve the current state of the tree and keep the current state")) (define-key map [bzr-sh] '(menu-item "Shelve..." vc-bzr-shelve :help "Shelve changes")) @@ -790,7 +809,7 @@ stream. Standard error output is discar (propertize x 'face 'font-lock-variable-name-face 'mouse-face 'highlight - 'help-echo "mouse-3: Show shelve menu\nA: Apply shelf\nC-k: Delete shelf" + 'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf\nS: Snapshot to a shelf\nC-k: Delete shelf" 'keymap vc-bzr-shelve-map)) shelve "\n")) (concat @@ -820,11 +839,28 @@ stream. Standard error output is discar ;; (pop-to-buffer (current-buffer))) (defun vc-bzr-shelve-apply (name) - "Apply shelve NAME." - (interactive "sApply shelf: ") + "Apply shelve NAME and remove it afterwards." + (interactive "sApply (and remove) shelf: ") (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name) (vc-resynch-buffer (vc-bzr-root default-directory) t t)) +(defun vc-bzr-shelve-apply-and-keep (name) + "Apply shelve NAME and keep it afterwards." + (interactive "sApply (and keep) shelf: ") + (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" "--keep" name) + (vc-resynch-buffer (vc-bzr-root default-directory) t t)) + +(defun vc-bzr-shelve-snapshot () + "Create a stash with the current tree state." + (interactive) + (vc-bzr-command "shelve" nil 0 nil "--all" "-m" + (let ((ct (current-time))) + (concat + (format-time-string "Snapshot on %Y-%m-%d" ct) + (format-time-string " at %H:%M" ct)))) + (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" "--keep") + (vc-resynch-buffer (vc-bzr-root default-directory) t t)) + (defun vc-bzr-shelve-list () (with-temp-buffer (vc-bzr-command "shelve" (current-buffer) 1 nil "--list" "-q") @@ -857,6 +893,10 @@ stream. Standard error output is discar (interactive) (vc-bzr-shelve-apply (vc-bzr-shelve-get-at-point (point)))) +(defun vc-bzr-shelve-apply-and-keep-at-point () + (interactive) + (vc-bzr-shelve-apply-and-keep (vc-bzr-shelve-get-at-point (point)))) + (defun vc-bzr-shelve-menu (e) (interactive "e") (vc-dir-at-event e (popup-menu vc-bzr-shelve-menu-map e))) ------------=_1277346842-25238-1--