import git branches as named branches using/importing merging code from git-hg-remote

7 views
Skip to first unread message

Uwe Brauer

unread,
Apr 28, 2023, 9:11:09 AM4/28/23
to via hg-git

Hi

At least two, unofficial, hg-git branches/topics allow to export
hg named branches.

1. Dan Villiom Podlaski Christiansen: change set 7765d8b6fdb3

2. Manuel Jacob change set 6942fb0a8c9d
(that one even allows to export topics as git branches.)

Importing git branches as named branches is however still not
supported by hg-git.

However I recently learned that there exists a converter aimed mainly for git
users, that converts git branches to mercurial named branches:

Felipe Contreras https://github.com/felipec/git-remote-hg/
(and forks of that repository).

For hg users, the workflow would be

1. So as a hg users I can clone a remote git repository with git, create
an empty hg repository and then push all git branches (in the
correct order) to my hg repository as named branches

2. I can then use hg to commit etc.

3. Then with git I pull from that local hg repository and push to
the remote git repository.

However it would be convenient, if one as a hg user could directly push
from the hg repository to the remote git repository, using hg-git.

Right now this is not possible since the git-remote-hg converter does
not transfer the git hashed to the local hg repository.

The question is then, could somebody of the hg-git developers either try


1. to include the import-named-branch functionality of Felipe's
converter to hg-git or

2. To add to his converter, the functionality of transferring the git hashes.

Either way, the benefit for hg users, who need to push and pull to git
repositories, would be considerable.

Thanks and regards

Uwe Brauer

--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
Reply all
Reply to author
Forward
0 new messages