t / t9132-git-svn-broken-symlink.shon commit Merge branch 'fc/git-complete-helper' into fc/git-prompt-script (423b5a1)
   1#!/bin/sh
   2
   3test_description='test that git handles an svn repository with empty symlinks'
   4
   5. ./lib-git-svn.sh
   6test_expect_success 'load svn dumpfile' '
   7        svnadmin load "$rawsvnrepo" <<EOF
   8SVN-fs-dump-format-version: 2
   9
  10UUID: 60780f9a-7df5-43b4-83ab-60e2c0673ef7
  11
  12Revision-number: 0
  13Prop-content-length: 56
  14Content-length: 56
  15
  16K 8
  17svn:date
  18V 27
  192008-11-26T07:17:27.590577Z
  20PROPS-END
  21
  22Revision-number: 1
  23Prop-content-length: 111
  24Content-length: 111
  25
  26K 7
  27svn:log
  28V 4
  29test
  30K 10
  31svn:author
  32V 12
  33normalperson
  34K 8
  35svn:date
  36V 27
  372008-11-26T07:18:03.511836Z
  38PROPS-END
  39
  40Node-path: bar
  41Node-kind: file
  42Node-action: add
  43Prop-content-length: 33
  44Text-content-length: 4
  45Text-content-md5: 912ec803b2ce49e4a541068d495ab570
  46Content-length: 37
  47
  48K 11
  49svn:special
  50V 1
  51*
  52PROPS-END
  53asdf
  54
  55Revision-number: 2
  56Prop-content-length: 121
  57Content-length: 121
  58
  59K 7
  60svn:log
  61V 13
  62bar => doink
  63
  64K 10
  65svn:author
  66V 12
  67normalperson
  68K 8
  69svn:date
  70V 27
  712008-11-27T03:55:31.601672Z
  72PROPS-END
  73
  74Node-path: bar
  75Node-kind: file
  76Node-action: change
  77Text-content-length: 10
  78Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9
  79Content-length: 10
  80
  81link doink
  82
  83EOF
  84'
  85
  86test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'
  87
  88test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' '
  89        test -L x/bar &&
  90        (cd x && test xasdf = x"`git cat-file blob HEAD:bar`")
  91'
  92
  93test_expect_success 'get "bar" => symlink fix from svn' '
  94        (cd x && git svn rebase)
  95'
  96
  97test_expect_success SYMLINKS '"bar" remains a proper symlink' '
  98        test -L x/bar &&
  99        (cd x && test xdoink = x"`git cat-file blob HEAD:bar`")
 100'
 101
 102test_done