t / t9104-git-svn-follow-parent.shon commit gitweb: Move git_get_last_activity subroutine earlier (c60c56c)
   1#!/bin/sh
   2#
   3# Copyright (c) 2006 Eric Wong
   4#
   5
   6test_description='git-svn --follow-parent fetching'
   7. ./lib-git-svn.sh
   8
   9if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
  10then
  11        echo 'Skipping: --follow-parent needs SVN libraries'
  12        test_done
  13        exit 0
  14fi
  15
  16test_expect_success 'initialize repo' "
  17        mkdir import &&
  18        cd import &&
  19        mkdir -p trunk &&
  20        echo hello > trunk/readme &&
  21        svn import -m 'initial' . $svnrepo &&
  22        cd .. &&
  23        svn co $svnrepo wc &&
  24        cd wc &&
  25        echo world >> trunk/readme &&
  26        svn commit -m 'another commit' &&
  27        svn up &&
  28        svn mv -m 'rename to thunk' trunk thunk &&
  29        svn up &&
  30        echo goodbye >> thunk/readme &&
  31        svn commit -m 'bye now' &&
  32        cd ..
  33        "
  34
  35test_expect_success 'init and fetch --follow-parent a moved directory' "
  36        git-svn init -i thunk $svnrepo/thunk &&
  37        git-svn fetch --follow-parent -i thunk &&
  38        git-rev-parse --verify refs/remotes/trunk &&
  39        test '$?' -eq '0'
  40        "
  41
  42test_debug 'gitk --all &'
  43
  44test_done