view tests/test-mq-guards.out @ 5403:477136fa6571

Always copy the necessary files before applying a git patch This patch removes the "copymod" attribute from the gitpatch class. AFAICS, that attribute was only used to delay the copying of renamed/copied files if there are no other changes to the target, but in this case, if there are changes to the source, we'll end up copying the wrong version. This should fix issue762.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 06 Oct 2007 15:30:15 -0300
parents 8369672060b5
children
line wrap: on
line source

adding x
Patch queue now empty
% should fail
abort: no patch named does-not-exist.patch
% should fail
abort: no patches applied
applying a.patch
Now at: a.patch
% should guard a.patch
% should print +a
a.patch: +a
Patch queue now empty
a.patch: +a
% should push b.patch
applying b.patch
Now at: b.patch
Patch queue now empty
number of unguarded, unapplied patches has changed from 2 to 3
% should push a.patch
applying a.patch
Now at: a.patch
% should print -a
c.patch: -a
% should skip c.patch
applying b.patch
skipping c.patch - guarded by '-a'
Now at: b.patch
% should display b.patch
b.patch
% should push c.patch
applying c.patch
Now at: c.patch
Patch queue now empty
guards deactivated
number of unguarded, unapplied patches has changed from 3 to 2
% should push all
applying b.patch
applying c.patch
Now at: c.patch
Patch queue now empty
number of unguarded, unapplied patches has changed from 1 to 2
% should push a.patch, not b.patch
applying a.patch
Now at: a.patch
applying c.patch
Now at: c.patch
Patch queue now empty
% should push b.patch
applying b.patch
Now at: b.patch
applying c.patch
Now at: c.patch
c.patch
Patch queue now empty
number of unguarded, unapplied patches has changed from 2 to 3
% should push a.patch, b.patch
applying a.patch
Now at: a.patch
applying b.patch
Now at: b.patch
Patch queue now empty
number of unguarded, unapplied patches has changed from 3 to 2
% list patches and guards
a.patch: +1 +2 -3
b.patch: +2
c.patch: unguarded
% list series
0 G a.patch
1 U b.patch
2 U c.patch
% list guards
1
2
3
% should push b.patch
applying b.patch
Now at: b.patch
applying c.patch
Now at: c.patch
guards deactivated
popping guarded patches
Patch queue now empty
reapplying unguarded patches
applying c.patch
Now at: c.patch
% guards in series file: +1 +2 -3
+1
+2
-3
% should show c.patch
c.patch
% should show :
% new.patch: +1 +2 -3
% b.patch: +2
% c.patch: unguarded
new.patch: +1 +2 -3
b.patch: +2
c.patch: unguarded
Now at: c.patch
% should show new.patch and b.patch as Guarded, c.patch as Applied
% and d.patch as Unapplied
0 G new.patch
1 G b.patch
2 A c.patch
3 U d.patch
% new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
0 G new.patch
1 G b.patch
2 A c.patch
3 G d.patch
Patch queue now empty
new.patch: +1 +2 -3
b.patch: +2
c.patch: unguarded
d.patch: +2
% hg qapplied
% hg qapplied -v
% hg qunapplied
c.patch
% hg qunapplied -v
0 G new.patch
1 G b.patch
2 U c.patch
3 G d.patch
number of unguarded, unapplied patches has changed from 1 to 2
% hg qapplied
% hg qapplied -v
% hg qunapplied
new.patch
c.patch
% hg qunapplied -v
0 U new.patch
1 G b.patch
2 U c.patch
3 G d.patch
applying new.patch
skipping b.patch - guarded by ['+2']
applying c.patch
skipping d.patch - guarded by ['+2']
Now at: c.patch
% hg qapplied
new.patch
c.patch
% hg qapplied -v
0 A new.patch
1 G b.patch
2 A c.patch
% hg qunapplied
% hg qunapplied -v
3 G d.patch
number of unguarded, unapplied patches has changed from 0 to 1
number of guarded, applied patches has changed from 1 to 0
% hg qapplied
new.patch
c.patch
% hg qapplied -v
0 A new.patch
1 U b.patch
2 A c.patch
% hg qunapplied
d.patch
% hg qunapplied -v
3 U d.patch
% hg qapplied new.patch
new.patch
% hg qunapplied new.patch
b.patch
d.patch
% hg qapplied b.patch
new.patch
% hg qunapplied b.patch
d.patch
% hg qapplied c.patch
new.patch
c.patch
% hg qunapplied c.patch
d.patch
% hg qapplied d.patch
new.patch
c.patch
% hg qunapplied d.patch
% hg qseries -m: only b.patch should be shown
the guards file was not ignored in the past
b.patch