Hi Malcolm,
Here’s the patch series Pierre-Yves talked about:
https://foss.heptapod.net/mercurial/hg-git/merge_requests/8.
Documentation is sparse, but you can have a look at the test case. Keep
in mind that the mechanism is completely flexible and could be adapted
for topics. You could try the following configuration:
[git]
export-additional-refs.named-branch-heads:revset = head() and topic()
export-additional-refs.named-branch-heads:template = refs/heads/{topic}
It is required that each topic has only one head. Otherwise, multiple
git commits would have the same ref, which obviously doesn’t work.
Note that this works only in the hg->git direction. For two-way
synchronization, you would need to write some custom code in hg-git that
tags each changeset with the correct topic based on the git ref on the
head of the branch, but that would be brittle and can’t work in general.
Also, you’d probably want some mechanism to synthesize obsmarkers from
the git commits. Again, this would be brittle.
-Manuel