On Thu, 30 Jul 2009, Bjoern Michaelsen wrote:
Guido Ostkamp <ooo <at> ostkamp.fastmail.fm> writes:
then Mercurial denies pushing because it would create remote heads. It is
clear that it tries to publish your anonymous branch which is unwanted
behaviour.
No, that is expected behavior.
I wasn't saying that the command does not act according to specs. However
a developer typcially doesn't want to push his ongoing unfinished work in
n branches. So the (default) behaviour without options is 'unwanted' from
a developers viewpoint. In my mind it would be better if only the current
branch would be pushed as default.
No, if you just want to push one branch, you would do just that: hg push
-r {branch/bookmark/changeset}
Ok.
No need for complex cloning and pulling - just use hg strip if you want
to delete an unwanted local branch (ok, that technically is the mq
extension, but requires none of the complex patch handling).
As far as I can see, the 'strip' command lacks a parameter to specify that
the current branch is to be deleted so that you have to manually look up
the first changeset after the branchpoint, which is not very comfortable.
Brendan Cully already thought about this in
<http://markmail.org/thread/5j7gnjgjde7fkt5o>, but that patch never made
it into official version (and of course, it is now also needed for
bookmarks style branches, not only true Mercurial branches). The patch
listed there cannot be applied anymore to sources because of structural
code changes in the last years.
It is still useful in some scenarios. However, none of the scenarios you
named so far would needed manual MQ patch handling. Gits branches are
well featured directly by mercurial without the need for manual patch
queue handling.
It seems that Matt and Co. have finally recognized that a lot of people
consider the local branches in the same repository as killer feature in
Git. However, the current Mercurial support is still far from what I
consider to be mature, it is only available through extensions, not
described in the books etc.
There are tons of different concepts e.g. extensions bookmarks,
(pbranch?), localbranch and the newest one seems to be tasks
<http://mercurial.selenic.com/wiki/TasksExtension>. I could not get
"tasks" to work with the current version, but maybe it gets fixed.
Personally, I liked the 'localbranch' because it was the most similar
compared to Git style. However, it was never fully finished and has at
least one known bug.
I have to admit that at least there seems to be some light at the end of
the tunnel.
You mean like:
hg rebase --base <MINIBRANCH-HEAD> --collapse --dest <CWS-HEAD>
hg push -r <CWS-HEAD>
Both heads could be named with a bookmark if you insist.
Yes. Thanks, I tried it and it appears to be working.
I would be interested to know how you did that with just one repo and no
clones and without running into the anonymous branch issues listed above.
Would it be possible to give a short example?
hg clone DEV300
hg pull my_cws
hg up -r DEV300_m53
build yadda yadda
hg up -Cr my_cws # note this is not a purge
build --from svtools --prepare yadda yadda
Absolutely no magic there.
Yes. It seems you have a CWS as remote branch, I was considering a freshly
created local one and more concerned about how a 'push' could be done, but
it can work with the '-r' option.
Regards
Guido
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]