[darcs-users] add/record time
Donald Bruce Stewart
dons at cse.unsw.edu.au
Thu Jul 31 02:26:00 UTC 2003
quension:
> it hasn't finished yet, so :) I may need to abort it at some point,
> but I'll let it finish if I can. If you want to use this as a test
> case, a bzipped pax/cpio archive of the two repositories is 33MB, and
> expands to around 200MB.
I tried to import the GHC fptools archive (around 60M of source),
and gave up after about 10 hours. Instead, it was much faster to
import a single directory and its contents one at a time. I used the
following script, and it imported the source in around 1 hour. I
know this is not ideal, but I needed it done that day.
This also revealed that darcs doesn't like whitespace in file
names, this seems reasonably easy to fix (haven't done this yet,
though).
Cheers,
Don
The script:
------------------------------------------------------------------------
#!/bin/sh
export EMAIL=dons
# $DIRS should contains a 'find -type d' listing of dirs to search in
DIRS="/home/dons/fptools.dirs"
MSG="Initial import of ghc-6-0-branch"
c=0
cat $DIRS | while read i ;
do
i=`echo "$i" | sed 's/ /\\ /g'`
echo "$i"
# add dir
darcs add "$i"
# add files in dir
for j in "$i"/*
do
if [ ! -d "$j" ]
then
echo "$j"
darcs add "$j"
fi
done
darcs record -a -m "$MSG" > /dev/null
# darcs seems confused if things happen too fast
if [ $c -le 150 ] ; then
sleep 1
c=`expr $c + 1`
fi
done
------------------------------------------------------------------------
More information about the darcs-users
mailing list