Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: CVS repository down



Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>:
> Mikael Magnusson wrote:
> > git clone git://repo.or.cz/zsh.git
> 
> I pushed that one to sourceforge [...]

That is a clone of Clint's cvs-to-git conversion from git.debian.org.
He uses tailor¹ to perform the conversion. It seems that tailor gets
confused here and there, as it quite often creates two (sometimes even
three) git commits per cvs commit.

[snip]
(6086)-/tmp/zsh [master]-% git log -12 | git shortlog
pws (12):
      add whole-path style to _perforce completer
      add whole-path style to _perforce completer
      unposted: fix definition of _perforce_whole_path in 26690
      unposted: fix definition of _perforce_whole_path in 26690
      26697: test for Linux- and Mac-style xattr functions
      derf@xxxxxxxxxxxxxxxxxxxxxxx: 26701: new devtodo completion
      derf@xxxxxxxxxxxxxxxxxxxxxxx: 26701: new devtodo completion
      26072: lexsave()/lexrestore() to fix bug with sourcing from "funny" places
      26072: lexsave()/lexrestore() to fix bug with sourcing from "funny" places
      26705: multibyte characters with Meta in ${(%)foo} etc.
      26705: multibyte characters with Meta in ${(%)foo} etc.
      print message if we give up trying to crate a lock file with hard links
[snap]

I think Clint chose tailor, because at the time 'git cvsimport' failed
to import the zsh repository. That however, isn't the case anymore.
And the history created by 'git cvsimport' seems to be a lot more
consistent with cvs's history.

To import the cvs repository into a git repository, the following
script may be used:

[snip]
#!/bin/sh

PROJECT='zsh'
MODULE='zsh'
DESTINATION="/usr/src/${PROJECT}.git"
AUTHORS="/usr/src/${PROJECT}-authors.txt"
CVS="/usr/src/mirror/${PROJECT}-cvs"
RSYNCURI="rsync://${PROJECT}.cvs.sourceforge.net/cvsroot/${PROJECT}"

[ ! -d "${CVS}" ] && { mkdir -p "${CVS}" || { printf 'Could not create %s.\n' "${CVS}" && exit 1 ; } ; }
(cd "${CVS}"; rsync -av "${RSYNCURI}/*" .)

if [ -f "${AUTHORS}" ] ; then
    git cvsimport -v -k -s- -a -u -A "${AUTHORS}" -C "${DESTINATION}" -d"${CVS}" "${MODULE}"
else
    git cvsimport -v -k -s- -a -u -C "${DESTINATION}" -d"${CVS}" "${MODULE}"
fi
[snap]

If you create a file that describes the cvs-usernames a little
further, git will transform that to "User Name <e@xxxxxxxx>" - which
is the common format when using git.

If the script above is unchanged, such a file would be named
/usr/src/zsh-authors.txt and it would look like this:

[snip]
pws=Peter Stephenson <pws@xxxxxxx>
barts=Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxx>
[snap]

And so on...

The initial import takes about 40 minutes on my really not up to date
laptop. After that you got a clean history in git, too.

Regards, Frank

¹ <http://progetti.arstecnica.it/tailor>

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



Messages sorted by: Reverse Date, Date, Thread, Author