4 # Some tests for 'darcs push'
6 not
() { "$@" && exit 1 ||
:; }
9 if uname |
grep -i cygwin
> /dev
/null
; then
15 # setting IFS is an ugly hack for Cygwin
16 # so that the portable_pwd backtick
30 # push without a repo gives an error
32 not darcs push
-p 123 2> log
33 grep -i 'missing argument' log
36 mkdir
-p temp
2/one
/two
38 # darcs push should work relative to the current directory
39 darcs push
-a ..
/..
/..
/temp1 |
grep -i 'No recorded local changes to push'
42 # darcs push should push into repo specified with --repo
45 darcs record
--patch-name uno
--all
48 darcs push
--repodir temp2
--all temp1 |
grep -i 'Finished apply'
51 # Before trying to pull from self, defaultrepo does not exist
52 test ! -e _darcs
/prefs
/defaultrepo
53 # return special message when you try to push to yourself
54 not darcs push
-a ${DIR}/temp1
2> log
55 grep -i "can't push to current repository!" log
56 # and don't update the default repo to be the current dir
57 test ! -e _darcs
/prefs
/defaultrepo