...so I've gotten used to the simple stuff with Mercurial (add
, commit
, diff
) and found out about the .hgignore file (yay!) and have gotten the hang of creating and switching between branches (branch
, update -C
).
I have two major questions though:
If I'm in branch "Branch1" and I want to pull in some but not all of the changes from branch "Branch2", how would I do that? Particularly if all the changes are in one subdirectory. (I guess I could just clone the whole repository, then use a directory-merge tool like Beyond Compare to pick&choose my edits. Seems like there ought to be a way to just isolate the changes in one file or one directory, though.)
Switching between branches with
update -C
seems so easy, I'm wondering why I would bother usingclone
. I can only think of a few reasons (see below) -- are there some other reasons I'm missing?a. if I need to act on two versions/branches at once (e.g. do a performance-metric diff)
b. for a backup (
clone
the repository to a network drive in a physically different location)c. to do the pick&choose merge like I've mentioned above.