views:

859

answers:

7

Hi all

For the last 6 months or so I've been using a 2-way Git mirror of our main Perforce repository at work to evaluate it for our workflow. I have to say I've fallen in love with using it but it has had one fatal flaw for me so far: it's Windows support is terrible.

Generally this is not an issue for me but right now it is. I need to do some work on some locally committed work in my Git repo and I cannot get to it from the machine I need to work on as there are some unsolvable issues with the Git distro on this box.

Anyhow, what I want to do if I can is to run a second mirror: this time piggy-backing off of my Git repository but serving via Mercurial or Bazar. I've found a few tools that look promising and some references in blog comments saying that people have done this but nothing complete.

So can anyone tell me if there is a simple way to maintain a 2-way mirror to a Git repository using another DVCS that will work on Windows without any trouble?

Thanks in advance for your troubles...

Jamie

A: 

Mercurial has probably the best support for Windows (out of git & bzr). It even has a TortoiseHg extension here.

Keltia
Mercurial is my preferred mirror but the question is how to create a 2-way Git / Mercurial mirror...if you know please do tell! Txs.
jkp
+3  A: 

I know that Mercurial has an extension that will let you convert from git to mercurial. More on http://www.selenic.com/mercurial/wiki/index.cgi/ConvertExtension

I haven't used it myself though.

kovica
I had a go with this last night: it doesn't convert the history from Git in a usable way, it merges all branches into the default branch due to the way Git treats branches internally. I need something I can do a reasonable two-way mirror with.
jkp
Points going here since it's the only answer that actually addresses the question I asked! Others might also like to look up "Taylor" which can help too...
jkp
Convert is strictly one-way. It's not the synchronization tool for which he's looking.
Ry4an
+3  A: 

[wikified since this isn't really an answer]

I'm using MSYS git without problems on Vista. I do host my git repos on a Debian GNU/Linux box though.

David Schmitt
The problem I have with Git on Windows is to do with the Windows box I use: It's a 64bit Windows 2008 install running on a KVM linux host as a VM. I've tried both Msys Git and cygwin:• Msys doesnt work on Windows 2008 64bit (knownbug)• Cygwin exposes bug in KVM.If I could I would!
jkp
jkp
Wow! What a pain. Congrats for finding a solution though!
David Schmitt
A: 

I think you're not likely to find a satisfactory solution with the currently available git to other DVCS synchronization tools. You could probably cobble together a workable system using git-svn to go from get to subversion and hgsubversion to synchronize between mercurial and subversion, but that seems like a crazy kludge just to get around weak git support on windows.

Perhaps you'd be better off emailing diffs from the windows box -- git has excellent email-patch-handling support (as does mercurial).

Ry4an
A: 

bzr has fast-import plugin, so you will be able to create 2-way conversion using fast-export/fast-import pair: http://bazaar-vcs.org/BzrFastImport

bialix
+1  A: 

There's also tailor that allows mirroring between several repositories. I had it working on Cygwin with quite some success -- until someone added files that made the command line svn choke; though that might be a rather rare problem to hit.

bluebrother
+5  A: 

A new option has popped up on the scene from the folks over at GitHub: git-hg. Now there's a way to do a two-way sync between Git and Mercurial.

jkp