Skip to contentSkip to conversation

git-cvsimport produces different (broken) repos when using pserver or local repo access

DISCUSSION Roger Leigh 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I've noticed that git-cvsimport can under some circumstances produce broken repositories. This appears to only occur when using pserver access to the CVS repo; running with a local repo is apparently fine, with all tested versions giving the same repo (master head has same hash for the last commit). In all cases cvsps version 2.1 was used.

Repo source:
pserver :pserver:[email protected]:/cvsroot/gimp-print
local rsync -av 'rsync://gimp-print.cvs.sourceforge.net/cvsroot/gimp-print/*' cvs-backup

I've tested with a number of git versions, including git.git as of yesterday:

git version                repo     last commit  URI
1.5.5.GIT                  local    a51c479826   git://git.debian.org/git/users/rleigh/gutenprint-upstream.git
1.5.5.GIT (2 failures)     pserver  bfa6f8248a   git://git.debian.org/git/users/rleigh/gutenprint-upstream-broken.git
1.5.5.GIT (no failure)     pserver  bfa6f8248a   git://git.debian.org/git/users/rleigh/gutenprint-upstream-pserver.git
1.5.6.5                    local    a51c479826   git://git.debian.org/git/users/rleigh/gutenprint-upstream-git1.5.6.5-local.git
1.5.6.5                    pserver  6f0950c097   git://git.debian.org/git/users/rleigh/gutenprint-upstream-git1.5.6.5-pserver.git
git.git 1.6.0.3.517.g759a  local    a51c479826   git://git.debian.org/git/users/rleigh/gutenprint-upstream-git1.6-local.git
git.git 1.6.0.3.517.g759a  pserver  6f0950c097   git://git.debian.org/git/users/rleigh/gutenprint-upstream-git1.6-pserver.git

With git 1.5.5 I'm tracking the CVS repo running git-cvsimport every 20 mins from a cron job. A few months ago it managed to botch, resulting in a broken repo (it didn't delete files deleted from CVS). I think this occurs when git-cvsimport fails (I get a perl error, though I'm afraid I don't have the log anymore); running again results in successful completion, but the repo is screwed, I think due to that commit being incomplete or something. This occured twice during the import in the second line in the above table, in this case resulting in missing files (src/cups/i18n.*). Again, I'm afraid I don't have the logs, but I can repeat again if this is not an already known/fixed issue. The repo is quite big, taking several hours to import, so it might possibly be a network connection problem and it's not handling that correctly on failure. However, even when the import comples successfully (line 3), the hash is still the same as line 2 where it failed twice and needed restarting.

So, it looks like depending on if I use a local repo directly or remove via pserver, I get a different repo. 1.5.5 using pserver is different to later versions, presumably this is a buggy version because it's broken whether or not I get a failure. Later versions always completed without failure; while the local and pserver using repos differ, they do both seem OK. However, I would have expected identical results, given that they are all created from the same data.

The script I used to do the import is attached.

Regards,
Roger

Signature · 4 lines
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

#!/bin/bash

CVSROOT=:pserver:[email protected]:/cvsroot/gimp-print CVSMODULE=print
HOME=/home/users/rleigh GIT_DIR=/var/lib/gforge/chroot/home/users/rleigh/public_git/gutenprint-upstream.git LOGDIR=${HOME}/log
LOCKFILE=${HOME}/gutenprint-cvs.lock
AUTHORS=${HOME}/gutenprint-auth

#date -R

lockfile -2 -r 2 ${LOCKFILE}

# If we managed to lock the file
if [ $? -eq 0 ]; then
# echo "Running git-cvsimport"

	export GIT_DIR
	export CVSROOT
	git-cvsimport -A $AUTHORS -i -v print
	rm -f ${LOCKFILE}

else
echo "Couldn't get lock for cvssuck"
fi

#date -R

andystewart=Andy Stewart <[email protected]> anikin=Eugene Anikin <[email protected]>
cpbs=Charles Briscoe-Smith <[email protected]>
daberti=Daniele Berti <[email protected]> davehill=Dave Hill <[email protected]>
degger=Daniel Egger <[email protected]> doctormo=Martin Owens <[email protected]> dpace=David Pace <[email protected]>
easysw=Mike Sweet <[email protected]>
faust3=Sascha Sommer <[email protected]>
gandy=Andy Thaller <[email protected]>
gtaylor=Grant Taylor <[email protected]>
iay=Ian Young <[email protected]>
jmv=Jean-Marc Verbavatz <[email protected]> julianbradfield=Julian Bradfield <[email protected]> khk=Karl Heinz Kremer <[email protected]>
m0m=Michael Mraka <[email protected]> mbroughtn=mbroughtn <[email protected]> menthos=Christian Rose <[email protected]> mitsch=Michael Natterer <[email protected]> mtomlinson=Mark Tomlinson <[email protected]> nestordi=nestor di <[email protected]> nicholas=nicholas <[email protected]> peter_missel=Peter Missel <[email protected]> rblancha=Richard Blanchard <[email protected]> rleigh=Roger Leigh <[email protected]>
rlk=Robert Krawitz <[email protected]>
rwisi=Richard Wisenoecker <[email protected]> sharkey=Eric Sharkey <[email protected]>
smiller=Steve Miller <[email protected]>
spa=Salvador Abreu <[email protected]>
stevek=Steve Kann <[email protected]>
tillkamppeter=Till Kamppeter <[email protected]> ttonino=Thomas Tonino <[email protected]>
tylerb=Tyler Blessing <[email protected]> uid21630=uid21630 <[email protected]> wiz=Joseph S. Wisniewski <[email protected]> wollvieh=Wolfgang Bauer <[email protected]> zoopa =Pete Parks <[email protected]>