Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / tests / issue885_get_to_match.sh
blobc3ecc7b9500b4b0a7973a4138f4eb16ff9b9acf1
1 #!/bin/sh
3 # Issue885: Regression: "darcs get --to-match" does not work anymore under 2.0
5 set -ev
7 ## I would use the builtin !, but that has the wrong semantics.
8 not () { "$@" && exit 1 || :; }
10 rm -rf temp1
11 mkdir temp1
12 cd temp1
13 darcs init
14 echo first > a
15 darcs add a
16 darcs record -am 'first'
17 firsthash=`darcs changes --xml | grep 'hash=' | sed -e "s/.*hash='//" -e "s/'>//"`
18 echo second > b
19 darcs add b
20 darcs record -am 'second'
22 # Pulling that patch works ok
23 cd ..
24 rm -rf temp2
25 mkdir temp2
26 cd temp2
27 darcs init
28 echo darcs pull -v -a --match "hash $firsthash" ../temp1
29 darcs pull -v -a --match "hash $firsthash" ../temp1
31 # Getting up-to that patch does not
32 cd ..
33 rm -rf temp3
34 echo darcs get -v --to-match "hash $firsthash" temp1 temp3
35 darcs get -v --to-match "hash $firsthash" temp1 temp3