From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Splitting changes Date: Thu, 03 Dec 2009 20:47:33 +0100 Message-ID: <874oo72622.fsf@telefonica.net> References: <200912011947.nB1JlaAp027561@godzilla.ics.uci.edu> <200912030748.nB37m5V4022253@godzilla.ics.uci.edu> <87k4x431n2.fsf@telefonica.net> <200912030907.nB39781X022853@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259869828 11184 80.91.229.12 (3 Dec 2009 19:50:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2009 19:50:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 03 20:50:21 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 1NGHgy-0006nb-FB for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2009 20:50:20 +0100 Original-Received: from localhost ([127.0.0.1]:40370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGHgy-0007Pj-9E for ged-emacs-devel@m.gmane.org; Thu, 03 Dec 2009 14:50:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGHeq-0006NU-SQ for emacs-devel@gnu.org; Thu, 03 Dec 2009 14:48:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGHem-0006L1-4B for emacs-devel@gnu.org; Thu, 03 Dec 2009 14:48:08 -0500 Original-Received: from [199.232.76.173] (port=59270 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGHel-0006Kt-US for emacs-devel@gnu.org; Thu, 03 Dec 2009 14:48:03 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:36433) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGHel-0003wS-Le for emacs-devel@gnu.org; Thu, 03 Dec 2009 14:48:03 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NGHee-0005li-RJ for emacs-devel@gnu.org; Thu, 03 Dec 2009 20:47:56 +0100 Original-Received: from 112.red-83-38-73.dynamicip.rima-tde.net ([83.38.73.112]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Dec 2009 20:47:56 +0100 Original-Received: from ofv by 112.red-83-38-73.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Dec 2009 20:47:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 112.red-83-38-73.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:96ULjNss4fy71tIr1KyV/jEYtog= 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:118206 Archived-At: Stefan Monnier writes: [snip] > 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 > This gives me great flexibility, and lets me use any tool I want to > select which parts to keep and which parts not. So I really like it. > But it has some serious drawbacks: > - if the final commit fails because the tree is not uptodate (any more), > the backend won't know that the update should apply to both the file > and its "stashed" copy. So you end up having to deal with updates > missing from the stashed copy, or abort the partial commit > (i.e. revert to the stashed copy), then update, then re-do the split > by hand. > > - when doing the split by hand, you can make any change you want. > The intention is for those changes to "undo" part of the local > changes, but nothing prevents you from adding new changes during this > time (as you revisit the code to choose how to split your changes, you > may bump into new opportunities for cleanup and it's sometimes > difficult to refrain from doing them at that point). And if you do > add local changes, then these will be undone after commit when the > saved files are re-instated. `bzr unshelve' merges the patch it contains, instead of blindly applying it. It is enough for solving those problems? [snip] -- Óscar