t / t9151 / make-svnmerge-dumpon commit Merge branch 'tr/maint-merge-ours-clarification' (early part) (c50230f)
   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"
  31svn cp trunk branches/right
  32
  33echo "Committing other BRANCH POINT"
  34svn commit -m "make right branch"
  35cd branches/left/
  36
  37#$sm init
  38#svn commit -m "init svnmerge"
  39
  40git cat-file blob 5873b67e:Makefile > Makefile
  41echo "Committing BRANCH UPDATE 1"
  42svn commit -m "left update 1"
  43cd ../..
  44
  45cd trunk
  46git cat-file blob 75118b13:Makefile > Makefile
  47echo "Committing TRUNK UPDATE"
  48svn commit -m "trunk update"
  49
  50cd ../branches/left
  51git cat-file blob ff5ebe39:Makefile > Makefile
  52echo "Committing BRANCH UPDATE 2"
  53svn commit -m "left update 2"
  54
  55git cat-file blob b5039db6:Makefile > Makefile
  56echo "Committing BRANCH UPDATE 3"
  57svn commit -m "left update 3"
  58
  59# merge to trunk
  60
  61cd ../..
  62svn update
  63cd trunk
  64
  65svn merge ../branches/left --accept postpone
  66
  67git cat-file blob b51ad431:Makefile > Makefile
  68
  69svn resolved Makefile
  70
  71svn commit -m "Merge trunk 1"
  72
  73# create commits on both branches
  74
  75cd ../branches/left
  76git cat-file blob ff5ebe39:Makefile > Makefile
  77echo "Committing BRANCH UPDATE 4"
  78svn commit -m "left update 4"
  79
  80cd ../right
  81git cat-file blob b5039db6:Makefile > Makefile
  82echo "Committing other BRANCH UPDATE 1"
  83svn commit -m "right update 1"
  84
  85# merge to trun again
  86
  87cd ../..
  88svn update
  89cd trunk
  90
  91svn merge ../branches/left --accept postpone
  92
  93git cat-file blob b51ad431:Makefile > Makefile
  94
  95svn resolved Makefile
  96
  97svn commit -m "Merge trunk 2"
  98
  99cd ../..
 100
 101svnadmin dump foo.svn > svn-mergeinfo.dump
 102
 103rm -rf foo foo.svn