4 # Test the --no-deps option with Send, Push, Pull, Obliterate and Unrecord.
6 # Create four patches with dependencies.
7 # file 'f': patch 'fa' and 'fb'
8 # file 'g': patch 'ga' and 'gb'
9 # The 'b' patches depend on the 'a' patches.
15 echo 'record no-ask-deps' >> _darcs
/prefs
/defaults
16 echo 'record ignore-times' >> _darcs
/prefs
/defaults
30 darcs init
--repodir d
33 # Try to Send all 'b' and 'g' patches. The two 'g' patches should succeed,
34 # but the 'fb' patch depends on the unselected 'fa' patch, an should be
37 darcs send
-o bundle
-a -p '[bg]' --no-deps d
39 grep '^\[fb$' bundle
&& exit 1
42 # Try to Push all 'b' and 'g' patches. Expect same result as for Send.
44 darcs push
-a -p '[bg]' --no-deps d
46 darcs changes |
grep '^ \* ga$'
47 darcs changes |
grep '^ \* fb$' && exit 1
51 # Try to Pull all 'b' and 'g' patches. Expect same result as for Send.
55 darcs pull
-a -p '[bg]' --no-deps ..
56 darcs changes |
grep '^ \* ga$'
57 darcs changes |
grep '^ \* fb$' && exit 1
61 # Try to Obliterate all 'a' and 'g' patches. The two 'g' patches should
62 # succeed, but the 'fa' patch depends on the unselected 'fb' patch, an
65 darcs get . tmp
; cd tmp
66 echo y
/y
/y
/q |
tr / \\012 | darcs obliterate
-p '[ag]' --no-deps
67 darcs changes |
grep '^ \* gb$' && exit 1
68 darcs changes |
grep '^ \* fa$'
72 # Try to Unrecord all 'a' and 'g' patches. Expect same result as for
75 # in "top" tmp repo -- destroys it!
76 echo y
/y
/y
/q |
tr / \\012 | darcs unrecord
-p '[ag]' --no-deps
77 darcs changes |
grep '^ \* gb$' && exit 1
78 darcs changes |
grep '^ \* fa$'