On Wed, Mar 22, 2023 at 2:37 PM Uwe Brauer <o...@mat.ucm.es> wrote: > > >>> "FC" == Felipe Contreras <felipe.contre...@gmail.com> writes: > > > On Thu, Mar 16, 2023 at 3:26 PM Uwe Brauer <o...@mat.ucm.es> wrote: > >> > I wrote the equivalent of hg-git for the git world: git-remote-hg [1], > >> > and there exporting named branches works fine. They have the > >> > "branches/" prefix and only one head is tracked. > >> > >> Do you mean exporting named hg branches into git branches? Yes that > >> seems ok, the other way around is the challenge, > > > No, I mean from git to hg. > > > If a ref has a "branches/" prefix, it's considered an hg branch, and > > all the commits pushed to that branch get tagged. > > Let me try to get this straight. > > 1. Suppose there is a mercurial repository in say sourceforge, that > contains two named branches:, default and stable. > > 2. You clone that repository with your plugin into a git repository. > I presume the named branches end up in the corresponding git > branches.
Yes. "branches/default", and "branches/stable". > 3. You make two commits on default and three commit on the stable branch. > > 4. You push (since you have write access), and all commits end up > in the correct named hg branch? Yes. > 5. What happens if you create an additional git branch, say bug-fix > and make a couple of commits and push. Do they end up as a new > named branch called bug-fix, or as a bookmark, or can you chose > between both? If it's named "bug-fix" it's created as a bookmark, if it's named "branches/bug-fix", it's created as a branch. But since Git has the notion of refspecs, you can choose on the fly: git push origin bug-fix:branches/bug-fix > 6. What's about topics, do you also support these? No. I stopped working on git-remote-hg for a while, and topics came afterward. I haven't investigated how to implement them, but it would be nice. Cheers. -- Felipe Contreras -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/CAMP44s3CbZYW-GH587z00X1xp8Mx%2BLEKgmsKhB%3DbaoxbhKsV-Q%40mail.gmail.com.