On Wed, Jul 27, 2011 at 10:08 AM, Dave Watts <[email protected]> wrote:
>
>> With Git and Mercurial, you can "shelve" changes. So if you are part
>> way through a big change and something important comes in, you can
>> tell the source control system to stash the current changes out of the
>> way, go back to your version prior to the current changes, make the
>> new important changes and commit them, then pull the uncommitted stuff
>> you were working on back into your working branch and go on your merry
>> way.
>
> But you're still going to have to be able to incorporate the changes
> that were made since your last checkout line-by-line, right? For
> example, if you check out somefile.cfm and change lines 50-75, then
> the important change affects lines 20-30, you're going to have to go
> back and diff the files before you can commit the changes you made
> before you shelved the file.

Of course, but if you are going to be changing the same line in each
of the commits you want to put out, you're going to have to do a merge
no matter what, even if you commit line by line.  The way I
interpreted the question is that the poster is looking for an easy way
to stop part way through some changes, switch over to do something
else in the same code area, then come back to finish up and
incorporate the changes they made during the digression.

In Git or Mercurial, I actually wouldn't probably use changeset
shelving either, though it is certainly possible. I'd create a new
branch from the last common point, switch to the new branch, make
changes and push/build/whatever, then merge that branch back to your
main development branch. If the changes were in a different section of
code, even in the same file, Git or Mercurial should be able to do the
merge automatically for you. If you changed the same line in both
change sets, you'll need to resolve the merge conflict with the
merge/diff tool of your choice.

Judah

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346370
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to