[PATCH 0 of 3] Clone and update without revision update to bookmark master or <branch>/master.
arne_bab at web.de
arne_bab at web.de
Thu Nov 3 12:11:21 UTC 2011
Hi,
Bookmarks as they are don’t work really well for me, because I cannot use them as nonpermanent branching model while still making sure that people who
clone my repository or pull and do an empty update get a working revision.
This patchseries addresses that issue by adapting the behavior of clone and update in case a master or <branch>/master bookmark is present:
* Clone: If there is a bookmark named master, clone chooses it as initial revision, regardless of the branch it resides on. This can also be used to mark
another branch than the default branch as initial branch.
* Update: If it is called without revision and there is a bookmark named master or <branchname>/master on the current branch (<branchname>), the bookmark is
selected as target revision.
Usecases:
* Set the initial revision for new contributors.
* Push still-worked-on revisions without disturbing other contributors and without storing branch information in the commits.
Possible improvements:
* Add a flag to push: --new-bookmarked-head: Allow pushing a head with a bookmark, when there is a master or <branch>/master bookmark on the branch. In
essence: Allow pushing safe heads.
TODO: Add tests (I need help for that)
Best wishes,
Arne
More information about the Mercurial-devel
mailing list