[966] in athena10
git-svn cloning the Athena repo
daemon@ATHENA.MIT.EDU (Evan Broder)
Sat Jan 24 15:22:30 2009
Message-ID: <497B784B.5080908@mit.edu>
Date: Sat, 24 Jan 2009 15:21:31 -0500
From: Evan Broder <broder@MIT.EDU>
MIME-Version: 1.0
To: Greg Price <price@mit.edu>
CC: Tim Abbott <tabbott@mit.edu>, debathena@mit.edu
In-Reply-To: <20090124084234.GM2161@vinegar-pot.mit.edu>
Content-Type: multipart/mixed;
boundary="------------000002060702020401030504"
This is a multi-part message in MIME format.
--------------000002060702020401030504
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
I've attached the script that I've been playing with. People are welcome
to play around with it and send comments back.
- Evan
Greg Price wrote:
> I find a git-svn clone of svn+ssh://svn.mit.edu/athena/trunk/debathena
> to work well for most purposes. I think broder has a new script that
> clones all the packages in git-svn without getting all the third-party
> stuff that makes cloning svn+ssh://svn.mit.edu/athena/trunk awful.
>
--------------000002060702020401030504
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
name="setup-git"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="setup-git"
#!/usr/bin/python
import os
import subprocess
import itertools
repo = 'svn+ssh://svn.mit.edu/athena/trunk'
equivs_packages = []
p = subprocess.Popen(['svn', 'ls',
'-R',
repo],
stdout=subprocess.PIPE)
for line in p.stdout:
cf = line.strip()
if cf.endswith('.equivs'):
equivs_packages.append(('dummy %s' % os.path.dirname(cf)))
misc = ['dummy debathena/third']
for line in itertools.chain(open('packages'),
equivs_packages,
misc):
pkg, path = line.split()
if not os.path.isdir(path):
try:
os.makedirs(os.path.dirname(path))
except OSError, e:
if e.errno != 17:
raise
subprocess.call(['git', 'svn',
'clone',
os.path.join(repo, path),
os.path.basename(path)],
cwd=os.path.dirname(path))
--------------000002060702020401030504--