diff --git a/src/gitolite.pm b/src/gitolite.pm index 8eee76c..0ce43bf 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -57,6 +57,12 @@ sub wrap_open { return $fh; } +sub dbg { + for my $i (@_) { + print STDERR "DBG: $i\n"; + } +} + sub log_it { my ($ip, $logmsg); open my $log_fh, ">>", $ENV{GL_LOG} or die "open log failed: $!\n"; diff --git a/t/rollback b/t/rollback index 84f3872..43894e3 100755 --- a/t/rollback +++ b/t/rollback @@ -8,4 +8,4 @@ tar xf rollback.tar mkdir td scp -q $TESTDIR/rollback.server gitolite-test@localhost:rollback || { echo scp failed; exit 1; } -ssh gitolite-test@localhost ./rollback +ssh gitolite-test@localhost ./rollback $GQT diff --git a/t/rollback.server b/t/rollback.server index b9c7e45..f8b84ec 100755 --- a/t/rollback.server +++ b/t/rollback.server @@ -3,3 +3,12 @@ cd rm -rf .ssh .gitolite .gitolite.rc repositories gitolite-install tar xf rollback.tar + +# if arg1 is a directory, we have to overwrite sources from there (see commit +# message for details) +if [ -d "$1" ] +then + cd .gitolite + /bin/cp -a $1/{src,hooks} . + cd +fi diff --git a/t/test-driver.sh b/t/test-driver.sh index 8473d5b..3461f9c 100755 --- a/t/test-driver.sh +++ b/t/test-driver.sh @@ -54,6 +54,7 @@ ugc () git push ${1:-gitolite}:gitolite-admin master git fetch origin >/dev/null 2>&1 ) >~/1 2>~/2 + grep DBG: ~/2 >/dev/null && grep . ~/1 ~/2 } mdc()