Posted by: Janus Dam Nielsen | September 10, 2010

Commiting only parts of a file in Mercurial

Let say you have a file and by accident changed two unrelated part of the file. Now it would be nice if one could commit each of the changes in their own changeset.

The solution for Mercurial is an extension called record.

You enable the extension in your hgrc file. You would properly want to do it in the ~/.hgrc file to make it system wide.
Just add:

hgext.record =

Then you just write:

hg record

You might also consider these other extensions:

hgext.fetch =
hgext.churn =
hgext.mq =
hgext.patchbomb =
hgext.graphlog =
hgext.highlight =
bfiles = ~/path_to_bfiles

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.