t / t9150 / make-svk-dumpon commit Merge branch 'js/ming-strftime' (4c5dbf1)
   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 svk.
   5#
   6
   7set -e
   8
   9svk depotmap foo ~/.svk/foo
  10svk co /foo/ foo
  11cd foo
  12mkdir trunk
  13mkdir branches
  14svk add trunk branches
  15svk commit -m "Setup trunk and branches"
  16cd trunk
  17
  18git cat-file blob 6683463e:Makefile > Makefile
  19svk add Makefile 
  20
  21svk commit -m "ancestor"
  22cd ..
  23svk cp trunk branches/left
  24
  25svk commit -m "make left branch"
  26cd branches/left/
  27
  28git cat-file blob 5873b67e:Makefile > Makefile
  29svk commit -m "left update 1"
  30
  31cd ../../trunk
  32git cat-file blob 75118b13:Makefile > Makefile
  33svk commit -m "trunk update"
  34
  35cd ../branches/left
  36git cat-file blob b5039db6:Makefile > Makefile
  37svk commit -m "left update 2"
  38
  39cd ../../trunk
  40svk sm /foo/branches/left
  41# in theory we could delete the "left" branch here, but it's not
  42# required so don't do it, in case people start getting ideas ;)
  43svk commit -m "merge branch 'left' into 'trunk'"
  44
  45git cat-file blob b51ad431:Makefile > Makefile
  46
  47svk diff Makefile && echo "Hey!  No differences, magic"
  48
  49cd ../..
  50
  51svnadmin dump ~/.svk/foo > svk-merge.dump
  52
  53svk co -d foo
  54rm -rf foo
  55svk depotmap -d /foo/
  56rm -rf ~/.svk/foo
  57