Uwe Brauer
unread,Dec 7, 2022, 11:16:00 AM12/7/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hg-git
Hi hg-git developers
I asked this a week ago, and will in some weeks start to collaborate
with users, that will use only git. In principle these will be simple
repositories with one or two git branches.
I'd like to use HG named branches and have the following workflow in mind.
Basic idea:
I have a working solution for «importing» and «exporting» named branches
to git. The idea is to use evolve, and to use the rebase and amend command.
This generates new changesets, with new HG Hashes but *empty* Git
hashes, these I can push (with -f)
These changes can in be pulled back to git if
git config pull.rebase true
Is set.
Here is the workflow,
1) Workflow 1
a) you created a named branch, and when you pull
A) hg phase -d -f -r somepublic-changes
B) hg rebase -s git-commit -d last-commit-named-branch
C) some HG changesets are not obsolete
D) new HG changesets are generated with *new* HG HASHES, but
*without* a git hash!!
E) hg push -f
b) GIT pulls with the option mentioned above
2) Workeflow 2
a) GIT has generated a new git branch,
A) you pull
B) hg up (to the base of the git branch)
C) hg branch name-of-git-branch
D) hg amend
E) hg evolve (most times not necessary)
F) hg push -f
b) GIT pulls again using the option mentioned above
I run several experiments with git sandboxes and it worked, however I am
not sure what happens with more complex git repositories and more users.
Any ideas HG-GIT developers? Or somebody else dealing really with git
repositories (I mean pulling and pushing, not just cloning).
Regards
Uwe Brauer