t / t9158-git-svn-mergeinfo.shon commit sha1_file: restore OBJECT_INFO_QUICK functionality (2b7750c)
   1#!/bin/sh
   2#
   3# Copyright (c) 2010 Steven Walter
   4#
   5
   6test_description='git svn mergeinfo propagation'
   7
   8. ./lib-git-svn.sh
   9
  10test_expect_success 'initialize source svn repo' '
  11        svn_cmd mkdir -m x "$svnrepo"/trunk &&
  12        svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
  13        (
  14                cd "$SVN_TREE" &&
  15                touch foo &&
  16                svn_cmd add foo &&
  17                svn_cmd commit -m "initial commit"
  18        ) &&
  19        rm -rf "$SVN_TREE"
  20'
  21
  22test_expect_success 'clone svn repo' '
  23        git svn init "$svnrepo"/trunk &&
  24        git svn fetch
  25'
  26
  27test_expect_success 'change svn:mergeinfo' '
  28        touch bar &&
  29        git add bar &&
  30        git commit -m "bar" &&
  31        git svn dcommit --mergeinfo="/branches/foo:1-10"
  32'
  33
  34test_expect_success 'verify svn:mergeinfo' '
  35        mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk) &&
  36        test "$mergeinfo" = "/branches/foo:1-10"
  37'
  38
  39test_expect_success 'change svn:mergeinfo multiline' '
  40        touch baz &&
  41        git add baz &&
  42        git commit -m "baz" &&
  43        git svn dcommit --mergeinfo="/branches/bar:1-10 /branches/other:3-5,8,10-11"
  44'
  45
  46test_expect_success 'verify svn:mergeinfo multiline' '
  47        mergeinfo=$(svn_cmd propget svn:mergeinfo "$svnrepo"/trunk) &&
  48        test "$mergeinfo" = "/branches/bar:1-10
  49/branches/other:3-5,8,10-11"
  50'
  51
  52test_done