diff tests/test-convert-cvs @ 10095:69ce7a10e593

convert: implement two hooks in builtin cvsps
author Frank Kingswood <frank@kingswood-consulting.co.uk>
date Tue, 15 Dec 2009 10:37:23 +0000
parents fc493cb90bb1
children 6109a02c682b
line wrap: on
line diff
--- a/tests/test-convert-cvs	Thu Dec 17 00:32:26 2009 +0100
+++ b/tests/test-convert-cvs	Tue Dec 15 10:37:23 2009 +0000
@@ -16,10 +16,23 @@
 echo "convert = " >> $HGRCPATH
 echo "graphlog = " >> $HGRCPATH
 
+cat > cvshooks.py <<EOF
+def cvslog(ui,repo,hooktype,log):
+    print "%s hook: %d entries"%(hooktype,len(log))
+
+def cvschangesets(ui,repo,hooktype,changesets):
+    print "%s hook: %d changesets"%(hooktype,len(changesets))
+EOF
+hookpath=$PWD
+
+echo "[hooks]" >> $HGRCPATH
+echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH
+echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH
+
 echo % create cvs repository
 mkdir cvsrepo
 cd cvsrepo
-CVSROOT=`pwd`
+CVSROOT=$PWD
 export CVSROOT
 CVS_OPTIONS=-f
 export CVS_OPTIONS