t / t9151 / make-svnmerge-dumpon commit Merge branch 'maint' (b7fba06)
   1#!/bin/sh
   2#
   3# this script sets up a Subversion repository for Makefile in the
   4# first ever git merge, as if it were done with svnmerge (SVN 1.5+)
   5#
   6
   7rm -rf foo.svn foo
   8set -e
   9
  10mkdir foo.svn
  11svnadmin create foo.svn
  12svn co file://`pwd`/foo.svn foo
  13
  14cd foo
  15mkdir trunk
  16mkdir branches
  17svn add trunk branches
  18svn commit -m "Setup trunk and branches"
  19cd trunk
  20
  21git cat-file blob 6683463e:Makefile > Makefile
  22svn add Makefile 
  23
  24echo "Committing ANCESTOR"
  25svn commit -m "ancestor"
  26cd ..
  27svn cp trunk branches/left
  28
  29echo "Committing BRANCH POINT"
  30svn commit -m "make left branch"
  31cd branches/left/
  32
  33#$sm init
  34#svn commit -m "init svnmerge"
  35
  36git cat-file blob 5873b67e:Makefile > Makefile
  37echo "Committing BRANCH UPDATE 1"
  38svn commit -m "left update 1"
  39cd ../..
  40
  41cd trunk
  42git cat-file blob 75118b13:Makefile > Makefile
  43echo "Committing TRUNK UPDATE"
  44svn commit -m "trunk update"
  45
  46cd ../branches/left
  47git cat-file blob ff5ebe39:Makefile > Makefile
  48echo "Committing BRANCH UPDATE 2"
  49svn commit -m "left update 2"
  50
  51git cat-file blob b5039db6:Makefile > Makefile
  52echo "Committing BRANCH UPDATE 3"
  53svn commit -m "left update 3"
  54
  55# merge to trunk
  56
  57cd ../..
  58svn update
  59cd trunk
  60
  61svn merge ../branches/left --accept postpone
  62
  63git cat-file blob b51ad431:Makefile > Makefile
  64
  65svn resolved Makefile
  66
  67svn commit -m "Merge trunk"
  68
  69cd ../..
  70
  71svnadmin dump foo.svn > svn-mergeinfo.dump
  72
  73rm -rf foo foo.svn