topics vs bookmarks and hg-git
Uwe Brauer
oub at mat.ucm.es
Wed Jul 29 07:03:02 UTC 2020
>>> "MJ" == Manuel Jacob <me at manueljacob.de> writes:
> Bookmarks work best with hg-git, as they can be easily mapped to Git
> refs and back.
> The following configuration will export all topic heads to Git
> branches with the name of the topic:
> [git]
> export-additional-refs.named-branch-heads:revset = head() and topic()
> export-additional-refs.named-branch-heads:template = refs/heads/{topic}
> With this configuration, if you push from Mercurial to Git and then
> pull from Git to Mercurial, all the topic heads will have a bookmark
> with the name of the topic, which is a mess of course. You could work
> around that by modifying the template to give them a different Git ref
> to avoid the naming clash, or add a hook removing the bookmarks, but
> then you won’t see if the Git side was updated.
I am one of the hg-git users, who uses topics and named branches and has
to deal with git repositories.
I find the following configuration more useful (tested in bitbucket, where everybody
used mercurial+hg-git and tested in sourceforge, where everybody besides
me uses git). In the above configuration git users will see a git branch
called default, which they might find confusing.
export-additional-refs.named-branch-heads:revset = head() and not branch('re:\Adefault\Z')
export-additional-refs.named-branch-heads:template = refs/heads/{branch}|{topic}
As Manual said, the problem is pulling from new commits of git users,
you will obtain bookmarks with the same name as the topics/named_branch
Uwe Brauer
> On 2020-07-29 01:14, Ernie Rael wrote:
>> Can (should) I use topics, instead of bookmarks, with hg-git and
>> github?
>> -ernie
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5673 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20200729/3904d23a/attachment.p7s>
More information about the Mercurial
mailing list