hg-git plugin, problem with local cloning: bookmarks

Sean Farley sean at farley.io
Thu Sep 1 19:01:15 UTC 2016


Simon King <simon at simonking.org.uk> writes:

> On Thu, Sep 1, 2016 at 9:06 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
>>
>>
>>    > Ahh, it looks like cloning a repo only creates bookmarks for the
>>    > remote's own branches. So if you were to `git checkout` each of the
>>    > branches in your local clone, and then re-clone locally with hg, you'd
>>    > get all the branches.
>>
>> GNU emacs which I am interested about has ~20 branches, so I have to
>> checkout each of them, and of each of them reclone? Cumbersome I say,
>> and even then I am not sure how re-clone is supposed to work.
>>
>> I am still puzzled why this is *not* necessary when I clone directly
>> from the git repo, but only when I clone locally.
>>
>
> git distinguishes between remote tracking branches (refs that live in
> the "remotes/<remotename>" namespace) and local branches. Remote
> branches automatically update whenever you fetch from or push to the
> server. Local branches only update when you ask them to (eg. via "git
> merge"). When you cloned the auctex repository from the server using
> git, the local repository ended up with 3 remote branches
> (remotes/origin/gendocspatch, remotes/origin/master and
> remotes/origin/simplify-TeX-parse-error) and 1 local branch (master).
>
> Core mercurial doesn't make this distinction, but there is an
> experimental extension which is trying to improve the situation
> (https://bitbucket.org/seanfarley/hgremotenames)

I've also experimented with doing this in hg-git:

https://bitbucket.org/seanfarley/hg-git/commits/branch/namespaces



More information about the Mercurial mailing list