Follow upstream changes -- rest
[git-darcs-import.git] / tests / ignoretimes.sh
blob10685862be919860814abb22e1aa5c1b50d81547
1 #!/usr/bin/env bash
3 set -ev
5 rm -rf temp1
7 mkdir temp1
8 cd temp1
9 darcs init
10 echo -e 'foo\nbar\nbaz' > f
11 darcs rec -Ax -alm p1
12 echo -e 'foo\nbar\nwibble' > f
13 darcs rec -Ax -alm p2
14 sleep 1 # ensure the timestamps would differ after this change alone
15 echo -e 'baz\nbar\nwibble' > f
17 # check that wh (without --ignore-times) sees the change now
18 darcs wh > whatsnew
19 grep 'foo' whatsnew
21 # the problematic unpull
22 darcs unpull --last 1 -a --ignore-times
24 # whatsnew will now think there are no changes without --ignore-times
25 darcs wh > whatsnew
26 grep 'foo' whatsnew
28 cd ..
29 rm -rf temp1