Hi,
I get this error:
Error: repository has at least one unnamed head: hg r533
How to cope with that?
Ciao, Dscho
Hi,
I get this error:
Error: repository has at least one unnamed head: hg r533
How to cope with that?
Ciao, Dscho
Re: hg2git error
Heya,
On Sun, May 24, 2009 at 19:33, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> How to cope with that?
I've been working on making hg-git [0] usable as a two-way bridge (that is, use it to interact with a hg repository using git). It is coping just fine with unnamed heads so far :).
</shameless plug>
[0] http://hg-git.github.com/
-- Cheers, Sverre Rabbelier
Re: hg2git error
Hi,
On Sun, 24 May 2009, Sverre Rabbelier wrote:
> On Sun, May 24, 2009 at 19:33, Johannes Schindelin > <Johannes.Schindelin@gmx.de> wrote: > > How to cope with that? > > I've been working on making hg-git [0] usable as a two-way bridge > (that is, use it to interact with a hg repository using git). It is > coping just fine with unnamed heads so far :). > > </shameless plug>
It says "Achtung! Alpha!". How alpha is it?
Also, there is the issue that it is a Hg extension. My experience with such extensions and their dependency on certain Hg versions make me ask: what version of Hg must I install before I can use Hg-git?
Ciao, Dscho
Re: hg2git error
Heya,
On Sun, May 24, 2009 at 20:16, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> It says "Achtung! Alpha!". How alpha is it?
I'm using it to work on Melange, the problems I've had with it so far have all been fixed :).
> Also, there is the issue that it is a Hg extension. My experience with > such extensions and their dependency on certain Hg versions make me ask: > what version of Hg must I install before I can use Hg-git?
Right, you will need to have hg installed to bridge between git and hg, I think the current requirements are 'python 2.5' and 'hg 1.2' but that's mostly because that's what we're testing, not because we depend on specific features.
-- Cheers, Sverre Rabbelier
Re: hg2git error
Hi,
On Sun, 24 May 2009, Sverre Rabbelier wrote:
> On Sun, May 24, 2009 at 20:16, Johannes Schindelin > <Johannes.Schindelin@gmx.de> wrote: > > It says "Achtung! Alpha!". How alpha is it? > > I'm using it to work on Melange, the problems I've had with it so far > have all been fixed :). > > > Also, there is the issue that it is a Hg extension. My experience > > with such extensions and their dependency on certain Hg versions make > > me ask: what version of Hg must I install before I can use Hg-git? > > Right, you will need to have hg installed to bridge between git and hg, > I think the current requirements are 'python 2.5' and 'hg 1.2' but > that's mostly because that's what we're testing, not because we depend > on specific features.
Could you give me a quick run-through how to install it and use it to mirror, say, the netbeans repository?
Thanks, Dscho
Re: hg2git error
Heya,
On Wed, Jul 22, 2009 at 17:47, Johannes Schindelin<Johannes.Schindelin@gmx.de> wrote:
> Could you give me a quick run-through how to install it and use it to > mirror, say, the netbeans repository?
Sure, feel free to ping me on IRC if you have any questions, I'll explain my workflow for Melange, I reckon you can adapt it to suit your needs.
1. clone hg-git ``` mkdir ~/code git clone git://github.com/schacon/hg-git.git ~/code ``` 2. edit your .hgrc to include the following to turn on the hg-git plugin, and the bookmarks plugin which hg-git likes to use to store branches from your git repository: ``` [extensions] hgext.bookmarks = git = ~/code/hg-git ``` 3. hg clone the repository of your choice, I'll pretend it's ~/code/Melange 4. add the following to ~/code/Melange/.hg/hgrc: ``` [git] intree=1 ``` 5. if possible, add '.git' to .hgignore, if not possible you'll just have to live with it showing up in 'hg status' 6. run `hg gexport`, this will create a ~/code/Melange/.git which is a regular git repository 7. add .hg to ~/code/Melange/.git/info/exclude 8. now each time you want to pull in new hg updates, run 'hg pull && hg gexport' 9. Depending on your preferences, you might want to add the following to your ~/code/Melange/.hg/hgrc below intree=1: ``` exportbranch=refs/heads/from-hg ```
Doing so will cause `hg gexport` to override the 'from-hg' branch instead of 'refs/heads/master', allowing you to work in the git repository without worrying about losing any changes when you run `hg gexport`. 10. Push from the git repository as usual: ``` git remote add origin ssh://srabbelier@repo.or.cz/srv/git/Melange.git git push origin master ```
If you have any questions, feel free to ask :).
-- Cheers, Sverre Rabbelier
Re: hg2git error
Hi,
* Johannes Schindelin wrote:
> Error: repository has at least one unnamed head: hg r533
I'm afraid there's nothing you can do except a) wait until somebody with push access to the repo merges or b) do that yourself. The error means that on a branch there's more than one head (i.e. childless revision). There's no equivalent concept in git which is why I don't know what to do. Generating fake branch names for git may be a little messy I think.
Rocco
Re: hg2git error
Hi,
On Mon, 25 May 2009, Rocco Rutte wrote:
> * Johannes Schindelin wrote: > > > Error: repository has at least one unnamed head: hg r533 > > I'm afraid there's nothing you can do except a) wait until somebody with > push access to the repo merges or b) do that yourself. The error means > that on a branch there's more than one head (i.e. childless > revision). There's no equivalent concept in git which is why I don't > know what to do. Generating fake branch names for git may be a little > messy I think.
I disagree... The worst solution is to stop working at all. A better solution would be to ignore the unnamed head, and the best solution would probably be to generate ref names that are _not_ branch names for such heads.
Ciao, Dscho
Re: hg2git error
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> I disagree... The worst solution is to stop working at all. A better > solution would be to ignore the unnamed head,
... or to import the commits of this unnamed head, without setting a Git reference to it (with a message on the console saying stg like "Unnamed head imported as commit %s\n" to let the user do something with the sha1).
> and the best solution would probably be to generate ref names that > are _not_ branch names for such heads.
Stg like refs/hg-heads/<branch>/<number> ? (seems to be accepted in the Git namespace)
(my 2 cents)
-- Matthieu
Re: hg2git error
Hi,
* Johannes Schindelin wrote:
> On Mon, 25 May 2009, Rocco Rutte wrote: > > * Johannes Schindelin wrote:
> > > Error: repository has at least one unnamed head: hg r533
> > I'm afraid there's nothing you can do except a) wait until somebody with > > push access to the repo merges or b) do that yourself. The error means > > that on a branch there's more than one head (i.e. childless > > revision). There's no equivalent concept in git which is why I don't > > know what to do. Generating fake branch names for git may be a little > > messy I think.
> I disagree... The worst solution is to stop working at all. A better > solution would be to ignore the unnamed head, and the best solution would > probably be to generate ref names that are _not_ branch names for such > heads.
Both solutions require refactoring and new code that is abled to walk the DAG mercurial gives us since in both cases we'd need to find the fork point. I don't know mercurials good enough to say if and how much its API can help here.
I don't use git any longer and do only fix obvious breakages for hg-fast-export, read: since this is a new feature I'm afraid I won't implement it.
Rocco