4 ms·
Disclaimer: I'm a git fan. Just to be clear - this does not have identical capabilities and benefits to gits branching model. For one, it does not appear that
by schacon 18y ago
Disclaimer: I'm a git fan.
Just to be clear - this does not have identical capabilities and benefits to gits branching model.
For one, it does not appear that you can push these branches, which means that you can't work on topic branches with anyone else.
Second, you can't _not_ push commits you have made under another 'bookmark' - in other words, you can't branch to try out some stuff, switch back to your main branch, do a fix and then push, without everyone getting all the crap in your 'try-out' branch. It may not be in the code that is checked out, but it is in the history, which does not look like it can be removed easily.
Also, it's awkward to use - you can't be working and then just create a bookmark, work some more, then go back to where you diverged easily - you have to create a new bookmark at the diverge point, which you have to look up. If you try to create two bookmarks at the same time (so one will stay where you where and the other will move forward) it will (for some reason) move both bookmarks forward (which is pretty confusing).
Apparently, the only way to _really_ do what git does with local branching is to do what the hg book recommends, which is to do a local clone. This takes orders of magnitude more time (depending on the repo), doubles the space taken up on disk and clutters your disk with a bunch of directories.
It may be slightly better than the local branches in hg in that it isn't recorded in the commit itself, but 'bookmarks' are very much not git branches.