##// END OF EJS Templates
mq: really remove undo after a qpush (and after a strip)...
Alexis S. L. Carvalho -
r5527:0b3f910d default
parent child Browse files
Show More
@@ -456,6 +456,7 b' class queue:'
456 raise
456 raise
457 finally:
457 finally:
458 del tr, lock, wlock
458 del tr, lock, wlock
459 self.removeundo(repo)
459
460
460 def _apply(self, repo, series, list=False, update_status=True,
461 def _apply(self, repo, series, list=False, update_status=True,
461 strict=False, patchdir=None, merge=None, all_files={}):
462 strict=False, patchdir=None, merge=None, all_files={}):
@@ -527,7 +528,6 b' class queue:'
527 self.ui.warn("fuzz found when applying patch, stopping\n")
528 self.ui.warn("fuzz found when applying patch, stopping\n")
528 err = 1
529 err = 1
529 break
530 break
530 self.removeundo(repo)
531 return (err, n)
531 return (err, n)
532
532
533 def delete(self, repo, patches, opts):
533 def delete(self, repo, patches, opts):
@@ -654,6 +654,9 b' class queue:'
654
654
655 self.removeundo(repo)
655 self.removeundo(repo)
656 repair.strip(self.ui, repo, rev, backup)
656 repair.strip(self.ui, repo, rev, backup)
657 # strip may have unbundled a set of backed up revisions after
658 # the actual strip
659 self.removeundo(repo)
657 finally:
660 finally:
658 del lock, wlock
661 del lock, wlock
659
662
@@ -1,5 +1,12 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 checkundo()
4 {
5 if [ -f .hg/store/undo ]; then
6 echo ".hg/store/undo still exists after $1"
7 fi
8 }
9
3 echo "[extensions]" >> $HGRCPATH
10 echo "[extensions]" >> $HGRCPATH
4 echo "mq=" >> $HGRCPATH
11 echo "mq=" >> $HGRCPATH
5
12
@@ -57,6 +64,7 b" echo '% qinit; <stuff>; qinit -c'"
57 hg init e
64 hg init e
58 cd e
65 cd e
59 hg qnew A
66 hg qnew A
67 checkundo qnew
60 echo foo > foo
68 echo foo > foo
61 hg add foo
69 hg add foo
62 hg qrefresh
70 hg qrefresh
@@ -100,14 +108,17 b" echo 'working dir diff:'"
100 hg diff --nodates -q
108 hg diff --nodates -q
101 # restore things
109 # restore things
102 hg qrefresh
110 hg qrefresh
111 checkundo qrefresh
103
112
104 echo % qpop
113 echo % qpop
105
114
106 hg qpop
115 hg qpop
116 checkundo qpop
107
117
108 echo % qpush
118 echo % qpush
109
119
110 hg qpush
120 hg qpush
121 checkundo qpush
111
122
112 cd ..
123 cd ..
113
124
@@ -394,6 +405,7 b' HGMERGE=true hg merge'
394 hg ci -m merge -d '0 0'
405 hg ci -m merge -d '0 0'
395 hg log
406 hg log
396 hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
407 hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
408 checkundo strip
397 hg log
409 hg log
398 cd ..
410 cd ..
399
411
@@ -7,6 +7,13 b' rewrite_path()'
7 sed -e 's:\\:/:g' -e 's:[^ ]*/t/::g'
7 sed -e 's:\\:/:g' -e 's:[^ ]*/t/::g'
8 }
8 }
9
9
10 checkundo()
11 {
12 if [ -f .hg/store/undo ]; then
13 echo ".hg/store/undo still exists after $1"
14 fi
15 }
16
10 echo "[extensions]" >> $HGRCPATH
17 echo "[extensions]" >> $HGRCPATH
11 echo "hgext.mq=" >> $HGRCPATH
18 echo "hgext.mq=" >> $HGRCPATH
12
19
@@ -25,6 +32,7 b' hg qrefresh -m "rm a"'
25
32
26 # Save the patch queue so we can merge it later
33 # Save the patch queue so we can merge it later
27 hg qsave -c -e 2>&1 | rewrite_path
34 hg qsave -c -e 2>&1 | rewrite_path
35 checkundo qsave
28
36
29 # Update b and commit in an "update" changeset
37 # Update b and commit in an "update" changeset
30 hg up -C init
38 hg up -C init
@@ -36,6 +44,7 b' hg ci -m update'
36 # The system cannot find the file specified => a
44 # The system cannot find the file specified => a
37 hg manifest
45 hg manifest
38 hg qpush -a -m 2>&1 | rewrite_path
46 hg qpush -a -m 2>&1 | rewrite_path
47 checkundo 'qpush -m'
39 hg manifest
48 hg manifest
40
49
41 # ensure status is correct after merge
50 # ensure status is correct after merge
General Comments 0
You need to be logged in to leave comments. Login now