[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Splitting changes

From: Stefan Monnier
Subject: Re: Splitting changes
Date: Thu, 03 Dec 2009 15:50:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> 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
> <hack, hack, hack>
> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]