On 09/03/2022 20.42, 'Sanjay Vasandani' via hg-git wrote:
> I noticed that hggit.usephases only says it marks changesets reachable from
> the Git remote's HEAD as public, or alternatively uses the Git branches
> listed in git.public. Is there any way to have *all* imported remote
> changesets be public?
> As an aside, I used to have my own command that wrapped pull do this. That
> is, mark all of the remote heads as public after pulling. With the addition
> of git.pull-prune-remote-branches and git.pull-prune-bookmarks (which are
> very welcome!), I think my wrapper cannot tell that a changeset came from
> remote if the hg tag/bookmark for the remote Git branch was deleted.
> If there's no way to do this currently, perhaps hook(s) can be added for
> operations that hg-git does during pull? e.g. import of a Git revision into
> an hg changeset, modification of an hg tag or bookmark, etc.
I don't think we allow that at the moment, but it'll probably come when
we add support for using path options. It definitely sounds like
something we shuld have.
However, until then, you can use a hook like this:
post-pull = hg phase -p "tag('re:default/.*') or gittag()"
Or if you don't mind publishing everything ever converted to Git:
post-pull = hg phase -p "fromgit()"