From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Splitting changes Date: Thu, 03 Dec 2009 15:50:12 -0500 Message-ID: References: <200912011947.nB1JlaAp027561@godzilla.ics.uci.edu> <200912030748.nB37m5V4022253@godzilla.ics.uci.edu> <87k4x431n2.fsf@telefonica.net> <200912030907.nB39781X022853@godzilla.ics.uci.edu> <874oo72622.fsf@telefonica.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259873529 23619 80.91.229.12 (3 Dec 2009 20:52:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2009 20:52:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?iso-8859-1?Q?=D3scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 03 21:52:01 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGIec-00005S-EV for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2009 21:51:58 +0100 Original-Received: from localhost ([127.0.0.1]:51383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGIec-0008Du-7N for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2009 15:51:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGIeV-0008DQ-Ql for emacs-devel@gnu.org; Thu, 03 Dec 2009 15:51:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGIeQ-000895-Sf for emacs-devel@gnu.org; Thu, 03 Dec 2009 15:51:50 -0500 Original-Received: from [199.232.76.173] (port=57653 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGIeQ-00088z-JK for emacs-devel@gnu.org; Thu, 03 Dec 2009 15:51:46 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:49846) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGIeQ-0001n3-1d for emacs-devel@gnu.org; Thu, 03 Dec 2009 15:51:46 -0500 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nB3KoD3d019594; Thu, 3 Dec 2009 15:50:13 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 092683A170; Thu, 3 Dec 2009 15:50:13 -0500 (EST) In-Reply-To: <874oo72622.fsf@telefonica.net> (=?iso-8859-1?Q?=22=D3scar?= Fuentes"'s message of "Thu, 03 Dec 2009 20:47:33 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3420=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118208 Archived-At: >> So the way my hack works is the following: >> - it takes ("stashes") a copy of the current state. >> - then it lets you make any changes you want (the intention is that >> you're going to revert the changes you want to keep for later). >> You can do this part at any granularity: files, hunks, or even >> by hand. >> - when done, you commit, after which the saved files are re-instated. > This can be achieved with the feature Dan is requesting for Bazaar (and > git already has): >> > 2. something similar to "git stash apply", i.e. apply the shelf but do >> > not remove it. This makes it easy to split changes for example. > With that feature you would do > bzr shelve --all > bzr unshelve --keep # that option would prevent removing the shelve > > bzr commit etc > bzr unshelve Yes, that sounds about right. IIUC "bzr unshelve --keep" is what Dan calls "bzr apply". So the fundamental backend operations that are needed are shelve/stash (with a vc-fileset), unshelve-keep/apply, and unshelve. We could even provide a default implementation that "shelves" by storing a patch, and unshelves by apply that patch, for those backends that don't support anything similar. Stefan