Skip to contentSkip to conversation

git-svn mirror in bare repo

DISCUSSION Enrico Weigelt 3 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi folks,

is it possible to use git-svn w/ an bare repository (eg. using an temporary workdir when necessary or directly creating tree and commit objects w/o going through workdir at all) ?

I'm running a dozen of mirrors (also from cvs), some from fairly large and I'd like to get rid of the working copies.

cu

Signature · 8 lines
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: [email protected]
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
#1 lore raw

Enrico Weigelt venit, vidit, dixit 23.08.2010 14:24:

Quoted 6 lines

Hi folks,

is it possible to use git-svn w/ an bare repository (eg. using an temporary workdir when necessary or directly creating tree and commit objects w/o going through workdir at all) ?

No.

Quoted 2 lines

I'm running a dozen of mirrors (also from cvs), some from fairly large and I'd like to get rid of the working copies.

Your only option is a different conversion tool. GSoC resulted in a lot of code in this direction, but I'm not sure it can do without a workdir. It is based on svndump

Michael

#2 lore raw
Quoted 9 lines · Michael J Gruber

Enrico Weigelt venit, vidit, dixit 23.08.2010 14:24:

Quoted 6 lines

Hi folks,

is it possible to use git-svn w/ an bare repository (eg. using an temporary workdir when necessary or directly creating tree and commit objects w/o going through workdir at all) ?

No.

hmm, can it work with an external workdir ?

Quoted 6 lines
Quoted 2 lines

I'm running a dozen of mirrors (also from cvs), some from fairly large and I'd like to get rid of the working copies.

Your only option is a different conversion tool. GSoC resulted in a lot of code in this direction, but I'm not sure it can do without a workdir. It is based on svndump

I guess that requires access to the raw repository (on the server), not just unprivileged svn client access, right ?

cu

Signature · 8 lines
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: [email protected]
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
#3 lore raw

Enrico Weigelt venit, vidit, dixit 23.08.2010 15:13:

Quoted 5 lines · Michael J Gruber
Quoted 4 lines

Enrico Weigelt venit, vidit, dixit 23.08.2010 14:24:

Quoted 3 lines

Hi folks,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

is it possible to use git-svn w/ an bare repository (eg. using an temporary workdir when necessary or directly creating tree and commit objects w/o going through workdir at all) ?

No.

hmm, can it work with an external workdir ?

You can have the workdir anywhere you like by using the core.worktree setting. So, if you mind the size requirements you can put it onto some fast tempdir (tmpfs, say). In fact, if all you do is "git svn fetch" then git svn may not even notice a missing worktree (would have to try). "git svn rebase" does need a worktree.

Quoted 10 lines
Quoted 7 lines
Quoted 3 lines

I'm running a dozen of mirrors (also from cvs), some from fairly large and I'd like to get rid of the working copies.

Your only option is a different conversion tool. GSoC resulted in a lot of code in this direction, but I'm not sure it can do without a workdir. It is based on svndump

I guess that requires access to the raw repository (on the server), not just unprivileged svn client access, right ?

In fact, Ram's GSoC project started off with svnrdump which is now part of the subversion code base (i.e. in their trunk). It is basically "svndump remote", i.e. a client outputting svn dump format.

Michael

P.S.: We usually keep cc's when replying here.

#4 lore raw
In reply to Enrico Weigelt
Quoted 6 lines · Enrico Weigelt

is it possible to use git-svn w/ an bare repository (eg. using an temporary workdir when necessary or directly creating tree and commit objects w/o going through workdir at all) ?

I'm running a dozen of mirrors (also from cvs), some from fairly large and I'd like to get rid of the working copies.

When I have a large repository with git-svn that I only occasionally want to use the working copy of it, here is what I do:

1) git svn clone the SVN repository normally
2) Create an "empty" branch with no files ("git checkout --orphan")

When I want to update SVN, I do:

git checkout trunk
git svn rebase
git checkout empty

When I want to push something to SVN I do:

git checkout trunk
git svn dcommit
git checkout empty

This makes it work sort of like a bare repository, but it still works with git-svn. I use this when I have a bunch of SVN repositories I need to be able to work with quickly at any time, but I don't want to waste the disk space having all of their working copies checked out simultaneously.