comparison tests/test-fastimport-cvs2git-fixup @ 45:783890f8a6fb

Test that my idealized version of cvs2git's output produces identical output.
author Greg Ward <greg-hg@gerg.ca>
date Mon, 11 May 2009 17:55:57 -0400
parents 61ff7b929cea
children
comparison
equal deleted inserted replaced
44:61ff7b929cea 45:783890f8a6fb
114 added iostream.h 114 added iostream.h
115 115
116 M 100644 :11363 main.cpp 116 M 100644 :11363 main.cpp
117 EOF 117 EOF
118 118
119 echo "% import cvs2git with branch/tag" 119 # Test that both dumps work (they should produce identical output).
120 set -e 120 #for dump in git-dump-1.dat git-dump-2.dat; do
121 hg init realcvs 121 for i in 1 2 ; do
122 hg -R realcvs fastimport git-blob.dat git-dump-1.dat \ 122 dump=git-dump-$i.dat
123 | sed "s|$HGTMP|HGTMP|g" 123 echo "----------------------------------------"
124 echo "% import $dump"
125 set -e
126 repo=realcvs.$i
127 hg init $repo
128 hg -R $repo fastimport git-blob.dat $dump \
129 | sed "s|$HGTMP|HGTMP|g"
124 130
125 echo "% hg glog" 131 echo "% hg glog ($dump)"
126 cd realcvs 132 cd $repo
127 template="rev: {rev}\nauthor: {author}\nbranch: '{branches}' tags: {tags}\nfiles: {files}\ndesc: {desc}\n\n" 133 template="rev: {rev}\nauthor: {author}\nbranch: '{branches}' tags: {tags}\nfiles: {files}\ndesc: {desc}\n\n"
128 hg glog -v --template="$template" 134 hg glog -v --template="$template"
129 135
130 echo "% hg branches" 136 echo "% hg branches ($dump)"
131 # Exclude default since its changeset ID is different with every run. 137 # Exclude default since its changeset ID is different with every run.
132 # (Same thing with tags and tip below.) 138 # (Same thing with tags and tip below.)
133 hg branches | grep -v "^default" 139 hg branches | grep -v "^default"
134 140
135 echo "% hg heads -v" 141 echo "% hg heads -v ($dump)"
136 hg heads --template="$template" 142 hg heads --template="$template"
137 143
138 echo "% hg tags -v" 144 echo "% hg tags -v ($dump)"
139 hg tags | grep -v "^tip" 145 hg tags | grep -v "^tip"
146 cd ..
147 done