1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-06 17:23:00 +01:00
git/t/t9104-git-svn-follow-parent.sh
Eric Wong 4385355454 git-svn: t/t91??-*: optimize the tests a bit
This removes some unnecessary 'svn up' calls throughout

t9103-git-svn-graft-branches.sh:
  * removed an 'svn log' call that was leftover from debugging
  * removed multiple git-svn calls with a multi-init / multi-fetch
    combination (which weren't tested before, either)
  * replaced `rev-list ... | head -n1` with `rev-parse ...`
    (not sure what I was thinking when I wrote that)

All this saves about 9 seconds from a test run
(53s -> 44s for 'make t91*') on my 1.3GHz Athlon

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 23:40:52 -08:00

36 lines
776 B
Bash
Executable file

#!/bin/sh
#
# Copyright (c) 2006 Eric Wong
#
test_description='git-svn --follow-parent fetching'
. ./lib-git-svn.sh
test_expect_success 'initialize repo' "
mkdir import &&
cd import &&
mkdir -p trunk &&
echo hello > trunk/readme &&
svn import -m 'initial' . $svnrepo &&
cd .. &&
svn co $svnrepo wc &&
cd wc &&
echo world >> trunk/readme &&
svn commit -m 'another commit' &&
svn mv -m 'rename to thunk' trunk thunk &&
svn up &&
echo goodbye >> thunk/readme &&
svn commit -m 'bye now' &&
cd ..
"
test_expect_success 'init and fetch --follow-parent a moved directory' "
git-svn init -i thunk $svnrepo/thunk &&
git-svn fetch --follow-parent -i thunk &&
git-rev-parse --verify refs/remotes/trunk &&
test '$?' -eq '0'
"
test_debug 'gitk --all &'
test_done