1876
General Software Discussion / Re: DVCS ?
« Last post by ewemoa on May 10, 2011, 09:35 AM »Thanks Armando, for your continued efforts 
As the topic of the index / staging area in Git is being touched upon, perhaps the following two extensions in Mercurial might be of interest:
http://mercurial.sel...wiki/RecordExtension
http://mercurial.sel...iki/CrecordExtension (demo video)
I've used both and much preferred the crecord extension experience (see video link above for a sample). There were a few times when crecord didn't seem to take note of some things I wanted committed -- but perhaps this has been fixed by now as it has been over half a year since I used Mercurial.
At:
http://kevin-berridg...ercurial-record.html
I encountered the following:

As the topic of the index / staging area in Git is being touched upon, perhaps the following two extensions in Mercurial might be of interest:
http://mercurial.sel...wiki/RecordExtension
http://mercurial.sel...iki/CrecordExtension (demo video)
The record extension provides the record command, which may be used in lieu of commit. This command lets you choose which parts of the changes in a working directory you'd like to commit, at the granularity of patch hunks.
The crecord extension is a curses (i.e. text-based GUI) interface which provides the crecord and qcrecord commands that may be used in lieu of commit or qnew -f. These commands let you choose which parts of the changes in a working directory you'd like to commit, at the granularity of patch hunks or lines.
I've used both and much preferred the crecord extension experience (see video link above for a sample). There were a few times when crecord didn't seem to take note of some things I wanted committed -- but perhaps this has been fixed by now as it has been over half a year since I used Mercurial.
At:
http://kevin-berridg...ercurial-record.html
I encountered the following:
sometimes you forget to be proactive about separating your changes and then you want to untangle them after the fact. You can do this using the Record extension. This is another extension that ships with Mercurial, but you have to enable it to use it.
The Record extension is invoked with "hg record" and will go through the files you've changed (or just the ones you tell it to look at) and will iterative over each change "hunk" in the file. A change hunk is a set of sequentially changed lines. For each hunk it asks you if you want to record the change or not. You simply say "y" if you want it, and "n" if you don't.
The result is a new commit that contains the changes you recorded. It's a surprisingly easy process.
However, there's a flaw with this approach. The resulting commit might be broken: it might not compile, or the tests might not pass. And since it turns directly into a commit, you don't really get the chance to test it...