Hi, > -- Does hg support branch operation? If so, how to create one? > Whenever I type "hg branches", I got nothing, even after I use "hg > branch mine" to try to create a new on.
Yes, hg supports branching within workspace. (And also branching by clonning new workspace). To create your branch, you have to $ hg branch mine $ hg ci -m 'Created mine branch' Branch is also created if both local and your parent workspace are modified (and committed). When you pull from your parent, so called "unnamed branch" is created (while the earlier example creates named branch). > -- Can hg revert the committed changeset? I mean I don't want to see > it in the "hg log" after I revert it. "hg backout" reverts the > context, not including the commit number and log. "hg strip" does that. It removes everything _from_ given revision till the last changeset in repository. So you can't remove changeset 4 without also removing changeset 5, 6, ... . > -- It's a bit difficult to understand "hg heads", if no branch, why > one repo has two or more head? how to fix this kind of issue? Every branch has one head. You may have unnamed branch (resulting from updating your parent if you made some changes locally). If this is the case, you 'fix' it by merging 1) Make sure you don't have outstanding changes $ hg status $ hg commit -m "my outstanding changes" 2) find out which branch is the main one $ hg branches - most probably 'default' is the correct one 3) move to it's tip (use appropriate name instead of default) $ hg update -C default (Make sure you merge _into_ the 'main' branch and not into your local changes. The direction is here important since the other branch is 'discontinued'. You may of course continue on it later). 4) merge with your 'local' change $ hg merge (if there is only one other head) $ hg merge REV (you have to select which revision to merge with if there is more than one) 5) hg commit -m "Merged with ..." Not very easy, is it ? :-/ -- Vlad
pgp6rdwhpxuPA.pgp
Description: PGP signature
_______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org