projects
/
invirt/scripts/git-migration.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the git checkout a bare repo, because git-svn won't do that.
[invirt/scripts/git-migration.git]
/
git-migrate
diff --git
a/git-migrate
b/git-migrate
index
b8d0f0f
..
911044e
100755
(executable)
--- a/
git-migrate
+++ b/
git-migrate
@@
-2,12
+2,18
@@
import sys
import subprocess
import sys
import subprocess
+import shutil
def clonePackage(base, pkg):
# Use --no-follow-parent because we're going to handle that with
# grafts.
subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent', '%s/packages/%s' % (base, pkg)],
stdout=subprocess.PIPE)
def clonePackage(base, pkg):
# Use --no-follow-parent because we're going to handle that with
# grafts.
subprocess.check_call(['git', 'svn', 'clone', '--no-follow-parent', '%s/packages/%s' % (base, pkg)],
stdout=subprocess.PIPE)
+
+ # Then make the repository bare, because git-svn can't do this
+ shutil.move('%s/.git' % pkg, '%s.git' % pkg)
+ shutil.rmtree('%s' % pkg)
+ subprocess.check_call(['git', 'config', 'core.bare', 'true'], cwd='%s.git' % pkg)
def cloneAllPackages(base):
for pkg in open('package-list'):
def cloneAllPackages(base):
for pkg in open('package-list'):