##// END OF EJS Templates
mq: consistently use qrefresh
timeless@mozdev.org -
r26780:bbf544b5 default
parent child Browse files
Show More
@@ -1097,10 +1097,10 b' class queue(object):'
1097 def checklocalchanges(self, repo, force=False, refresh=True):
1097 def checklocalchanges(self, repo, force=False, refresh=True):
1098 excsuffix = ''
1098 excsuffix = ''
1099 if refresh:
1099 if refresh:
1100 excsuffix = ', refresh first'
1100 excsuffix = ', qrefresh first'
1101 # plain versions for i18n tool to detect them
1101 # plain versions for i18n tool to detect them
1102 _("local changes found, refresh first")
1102 _("local changes found, qrefresh first")
1103 _("local changed subrepos found, refresh first")
1103 _("local changed subrepos found, qrefresh first")
1104 return checklocalchanges(repo, force, excsuffix)
1104 return checklocalchanges(repo, force, excsuffix)
1105
1105
1106 _reserved = ('series', 'status', 'guards', '.', '..')
1106 _reserved = ('series', 'status', 'guards', '.', '..')
@@ -1454,7 +1454,7 b' class queue(object):'
1454 return ret[0]
1454 return ret[0]
1455 top = self.applied[-1].name
1455 top = self.applied[-1].name
1456 if ret[0] and ret[0] > 1:
1456 if ret[0] and ret[0] > 1:
1457 msg = _("errors during apply, please fix and refresh %s\n")
1457 msg = _("errors during apply, please fix and qrefresh %s\n")
1458 self.ui.write(msg % top)
1458 self.ui.write(msg % top)
1459 else:
1459 else:
1460 self.ui.write(_("now at: %s\n") % top)
1460 self.ui.write(_("now at: %s\n") % top)
@@ -1549,7 +1549,7 b' class queue(object):'
1549
1549
1550 tobackup = set(a + m + r) & tobackup
1550 tobackup = set(a + m + r) & tobackup
1551 if keepchanges and tobackup:
1551 if keepchanges and tobackup:
1552 raise error.Abort(_("local changes found, refresh first"))
1552 raise error.Abort(_("local changes found, qrefresh first"))
1553 self.backup(repo, tobackup)
1553 self.backup(repo, tobackup)
1554 repo.dirstate.beginparentchange()
1554 repo.dirstate.beginparentchange()
1555 for f in a:
1555 for f in a:
@@ -1604,9 +1604,9 b' class queue(object):'
1604 self.checktoppatch(repo)
1604 self.checktoppatch(repo)
1605 (top, patchfn) = (self.applied[-1].node, self.applied[-1].name)
1605 (top, patchfn) = (self.applied[-1].node, self.applied[-1].name)
1606 if repo.changelog.heads(top) != [top]:
1606 if repo.changelog.heads(top) != [top]:
1607 raise error.Abort(_("cannot refresh a revision with children"))
1607 raise error.Abort(_("cannot qrefresh a revision with children"))
1608 if not repo[top].mutable():
1608 if not repo[top].mutable():
1609 raise error.Abort(_("cannot refresh public revision"),
1609 raise error.Abort(_("cannot qrefresh public revision"),
1610 hint=_('see "hg help phases" for details'))
1610 hint=_('see "hg help phases" for details'))
1611
1611
1612 cparents = repo.changelog.parents(top)
1612 cparents = repo.changelog.parents(top)
@@ -1814,7 +1814,7 b' class queue(object):'
1814 ctx = repo[cparents[0]]
1814 ctx = repo[cparents[0]]
1815 repo.dirstate.rebuild(ctx.node(), ctx.manifest())
1815 repo.dirstate.rebuild(ctx.node(), ctx.manifest())
1816 self.savedirty()
1816 self.savedirty()
1817 self.ui.warn(_('refresh interrupted while patch was popped! '
1817 self.ui.warn(_('qrefresh interrupted while patch was popped! '
1818 '(revert --all, qpush to recover)\n'))
1818 '(revert --all, qpush to recover)\n'))
1819 raise
1819 raise
1820 finally:
1820 finally:
@@ -61,7 +61,7 b' should fail in strict mode'
61 1 out of 1 hunks FAILED -- saving rejects to file a.rej
61 1 out of 1 hunks FAILED -- saving rejects to file a.rej
62 patch failed, unable to continue (try -v)
62 patch failed, unable to continue (try -v)
63 patch failed, rejects left in working directory
63 patch failed, rejects left in working directory
64 errors during apply, please fix and refresh eol.diff
64 errors during apply, please fix and qrefresh eol.diff
65 [2]
65 [2]
66 $ hg qpop
66 $ hg qpop
67 popping eol.diff
67 popping eol.diff
@@ -73,7 +73,7 b' invalid eol'
73 applying eol.diff
73 applying eol.diff
74 patch failed, unable to continue (try -v)
74 patch failed, unable to continue (try -v)
75 patch failed, rejects left in working directory
75 patch failed, rejects left in working directory
76 errors during apply, please fix and refresh eol.diff
76 errors during apply, please fix and qrefresh eol.diff
77 [2]
77 [2]
78 $ hg qpop
78 $ hg qpop
79 popping eol.diff
79 popping eol.diff
@@ -170,7 +170,7 b' Test .rej file EOL are left unchanged'
170 1 out of 1 hunks FAILED -- saving rejects to file a.rej
170 1 out of 1 hunks FAILED -- saving rejects to file a.rej
171 patch failed, unable to continue (try -v)
171 patch failed, unable to continue (try -v)
172 patch failed, rejects left in working directory
172 patch failed, rejects left in working directory
173 errors during apply, please fix and refresh patch1
173 errors during apply, please fix and qrefresh patch1
174 [2]
174 [2]
175 $ hg qpop
175 $ hg qpop
176 popping patch1
176 popping patch1
@@ -193,7 +193,7 b' Test .rej file EOL are left unchanged'
193 1 out of 1 hunks FAILED -- saving rejects to file a.rej
193 1 out of 1 hunks FAILED -- saving rejects to file a.rej
194 patch failed, unable to continue (try -v)
194 patch failed, unable to continue (try -v)
195 patch failed, rejects left in working directory
195 patch failed, rejects left in working directory
196 errors during apply, please fix and refresh patch1
196 errors during apply, please fix and qrefresh patch1
197 [2]
197 [2]
198 $ hg qpop
198 $ hg qpop
199 popping patch1
199 popping patch1
@@ -45,7 +45,7 b' Push patch with missing target:'
45 2 out of 2 hunks FAILED -- saving rejects to file b.rej
45 2 out of 2 hunks FAILED -- saving rejects to file b.rej
46 patch failed, unable to continue (try -v)
46 patch failed, unable to continue (try -v)
47 patch failed, rejects left in working directory
47 patch failed, rejects left in working directory
48 errors during apply, please fix and refresh changeb
48 errors during apply, please fix and qrefresh changeb
49 [2]
49 [2]
50
50
51 Display added files:
51 Display added files:
@@ -98,7 +98,7 b' Test missing renamed file'
98 b not tracked!
98 b not tracked!
99 patch failed, unable to continue (try -v)
99 patch failed, unable to continue (try -v)
100 patch failed, rejects left in working directory
100 patch failed, rejects left in working directory
101 errors during apply, please fix and refresh changebb
101 errors during apply, please fix and qrefresh changebb
102 [2]
102 [2]
103 $ cat a
103 $ cat a
104 a
104 a
@@ -150,7 +150,7 b' Push git patch with missing target:'
150 1 out of 1 hunks FAILED -- saving rejects to file b.rej
150 1 out of 1 hunks FAILED -- saving rejects to file b.rej
151 patch failed, unable to continue (try -v)
151 patch failed, unable to continue (try -v)
152 patch failed, rejects left in working directory
152 patch failed, rejects left in working directory
153 errors during apply, please fix and refresh changeb
153 errors during apply, please fix and qrefresh changeb
154 [2]
154 [2]
155 $ hg st
155 $ hg st
156 ? b.rej
156 ? b.rej
@@ -59,7 +59,7 b' Fold with local changes:'
59
59
60 $ echo d >> a
60 $ echo d >> a
61 $ hg qfold p3
61 $ hg qfold p3
62 abort: local changes found, refresh first
62 abort: local changes found, qrefresh first
63 [255]
63 [255]
64
64
65 $ hg diff -c .
65 $ hg diff -c .
@@ -181,7 +181,7 b" and that combination of '--edit' and '--"
181
181
182 $ rm -f .hg/last-message.txt
182 $ rm -f .hg/last-message.txt
183 $ HGEDITOR="sh $TESTTMP/editor.sh" hg qfold -e -m MESSAGE p3
183 $ HGEDITOR="sh $TESTTMP/editor.sh" hg qfold -e -m MESSAGE p3
184 refresh interrupted while patch was popped! (revert --all, qpush to recover)
184 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
185 abort: emulating unexpected abort
185 abort: emulating unexpected abort
186 [255]
186 [255]
187 $ test -f .hg/last-message.txt
187 $ test -f .hg/last-message.txt
@@ -232,7 +232,7 b" and that combination of '--edit' and '--"
232 transaction abort!
232 transaction abort!
233 rollback completed
233 rollback completed
234 note: commit message saved in .hg/last-message.txt
234 note: commit message saved in .hg/last-message.txt
235 refresh interrupted while patch was popped! (revert --all, qpush to recover)
235 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
236 abort: pretxncommit.unexpectedabort hook exited with status 1
236 abort: pretxncommit.unexpectedabort hook exited with status 1
237 [255]
237 [255]
238 $ cat .hg/last-message.txt
238 $ cat .hg/last-message.txt
@@ -63,7 +63,7 b' changes in unrelated files:'
63 $ echo f >> c
63 $ echo f >> c
64
64
65 $ hg qgoto 1
65 $ hg qgoto 1
66 abort: local changes found, refresh first
66 abort: local changes found, qrefresh first
67 [255]
67 [255]
68 $ hg qgoto 1 -f
68 $ hg qgoto 1 -f
69 popping bug141421
69 popping bug141421
@@ -204,7 +204,7 b' qpush --exact --force with changes to a '
204 1 out of 1 hunks FAILED -- saving rejects to file fp0.rej
204 1 out of 1 hunks FAILED -- saving rejects to file fp0.rej
205 patch failed, unable to continue (try -v)
205 patch failed, unable to continue (try -v)
206 patch failed, rejects left in working directory
206 patch failed, rejects left in working directory
207 errors during apply, please fix and refresh p0
207 errors during apply, please fix and qrefresh p0
208 [2]
208 [2]
209 $ cat fp0
209 $ cat fp0
210 cp0-bad
210 cp0-bad
@@ -231,7 +231,7 b' qpush --exact --force with changes to a '
231 1 out of 1 hunks FAILED -- saving rejects to file fp1.rej
231 1 out of 1 hunks FAILED -- saving rejects to file fp1.rej
232 patch failed, unable to continue (try -v)
232 patch failed, unable to continue (try -v)
233 patch failed, rejects left in working directory
233 patch failed, rejects left in working directory
234 errors during apply, please fix and refresh p1
234 errors during apply, please fix and qrefresh p1
235 [2]
235 [2]
236 $ cat fp1
236 $ cat fp1
237 cp1-bad
237 cp1-bad
@@ -233,22 +233,22 b' test qpop --keep-changes'
233 [255]
233 [255]
234 $ echo a >> a
234 $ echo a >> a
235 $ hg qpop --keep-changes
235 $ hg qpop --keep-changes
236 abort: local changes found, refresh first
236 abort: local changes found, qrefresh first
237 [255]
237 [255]
238 $ hg revert -qa a
238 $ hg revert -qa a
239 $ rm a
239 $ rm a
240 $ hg qpop --keep-changes
240 $ hg qpop --keep-changes
241 abort: local changes found, refresh first
241 abort: local changes found, qrefresh first
242 [255]
242 [255]
243 $ hg rm -A a
243 $ hg rm -A a
244 $ hg qpop --keep-changes
244 $ hg qpop --keep-changes
245 abort: local changes found, refresh first
245 abort: local changes found, qrefresh first
246 [255]
246 [255]
247 $ hg revert -qa a
247 $ hg revert -qa a
248 $ echo b > b
248 $ echo b > b
249 $ hg add b
249 $ hg add b
250 $ hg qpop --keep-changes
250 $ hg qpop --keep-changes
251 abort: local changes found, refresh first
251 abort: local changes found, qrefresh first
252 [255]
252 [255]
253 $ hg forget b
253 $ hg forget b
254 $ echo d > d
254 $ echo d > d
@@ -303,7 +303,7 b' test qpush --force and backup files'
303 committing manifest
303 committing manifest
304 committing changelog
304 committing changelog
305 patch failed, rejects left in working directory
305 patch failed, rejects left in working directory
306 errors during apply, please fix and refresh p3
306 errors during apply, please fix and qrefresh p3
307 [2]
307 [2]
308 $ cat a.orig
308 $ cat a.orig
309 a
309 a
@@ -449,7 +449,7 b' test mq.keepchanges setting'
449 now at: p2
449 now at: p2
450 $ hg st b
450 $ hg st b
451 $ hg --config mq.keepchanges=1 qpush --exact
451 $ hg --config mq.keepchanges=1 qpush --exact
452 abort: local changes found, refresh first
452 abort: local changes found, qrefresh first
453 [255]
453 [255]
454 $ hg revert -qa a
454 $ hg revert -qa a
455 $ hg qpop
455 $ hg qpop
@@ -139,7 +139,7 b' Test saving last-message.txt:'
139
139
140 $ rm -f .hg/last-message.txt
140 $ rm -f .hg/last-message.txt
141 $ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
141 $ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
142 refresh interrupted while patch was popped! (revert --all, qpush to recover)
142 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
143 abort: emulating unexpected abort
143 abort: emulating unexpected abort
144 [255]
144 [255]
145 $ test -f .hg/last-message.txt
145 $ test -f .hg/last-message.txt
@@ -188,7 +188,7 b' Test saving last-message.txt:'
188 transaction abort!
188 transaction abort!
189 rollback completed
189 rollback completed
190 note: commit message saved in .hg/last-message.txt
190 note: commit message saved in .hg/last-message.txt
191 refresh interrupted while patch was popped! (revert --all, qpush to recover)
191 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
192 abort: pretxncommit.unexpectedabort hook exited with status 1
192 abort: pretxncommit.unexpectedabort hook exited with status 1
193 [255]
193 [255]
194 $ cat .hg/last-message.txt
194 $ cat .hg/last-message.txt
@@ -231,7 +231,7 b' external process'
231 transaction abort!
231 transaction abort!
232 rollback completed
232 rollback completed
233 note: commit message saved in .hg/last-message.txt
233 note: commit message saved in .hg/last-message.txt
234 refresh interrupted while patch was popped! (revert --all, qpush to recover)
234 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
235 abort: pretxncommit.unexpectedabort hook exited with status 1
235 abort: pretxncommit.unexpectedabort hook exited with status 1
236 [255]
236 [255]
237
237
@@ -269,7 +269,7 b' dropping status of "file2")'
269 ====
269 ====
270 transaction abort!
270 transaction abort!
271 rollback completed
271 rollback completed
272 refresh interrupted while patch was popped! (revert --all, qpush to recover)
272 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
273 abort: pretxncommit.unexpectedabort hook exited with status 1
273 abort: pretxncommit.unexpectedabort hook exited with status 1
274 [255]
274 [255]
275
275
@@ -311,7 +311,7 b' dropping status of "file2")'
311 ====
311 ====
312 transaction abort!
312 transaction abort!
313 rollback completed
313 rollback completed
314 refresh interrupted while patch was popped! (revert --all, qpush to recover)
314 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
315 abort: pretxncommit.unexpectedabort hook exited with status 1
315 abort: pretxncommit.unexpectedabort hook exited with status 1
316 [255]
316 [255]
317
317
@@ -503,7 +503,7 b' but only after writing the bad name into'
503 > bar'
503 > bar'
504 transaction abort!
504 transaction abort!
505 rollback completed
505 rollback completed
506 refresh interrupted while patch was popped! (revert --all, qpush to recover)
506 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
507 abort: username 'foo\nbar' contains a newline!
507 abort: username 'foo\nbar' contains a newline!
508 [255]
508 [255]
509 $ rm a
509 $ rm a
@@ -519,7 +519,7 b' but only after writing the bad name into'
519 $ hg qrefresh -u ' '
519 $ hg qrefresh -u ' '
520 transaction abort!
520 transaction abort!
521 rollback completed
521 rollback completed
522 refresh interrupted while patch was popped! (revert --all, qpush to recover)
522 qrefresh interrupted while patch was popped! (revert --all, qpush to recover)
523 abort: empty username!
523 abort: empty username!
524 [255]
524 [255]
525 $ cat .hg/patches/a
525 $ cat .hg/patches/a
@@ -25,7 +25,7 b' Try to operate on public mq changeset'
25 $ hg phase --public qbase
25 $ hg phase --public qbase
26 $ echo babar >> foo
26 $ echo babar >> foo
27 $ hg qref
27 $ hg qref
28 abort: cannot refresh public revision
28 abort: cannot qrefresh public revision
29 (see "hg help phases" for details)
29 (see "hg help phases" for details)
30 [255]
30 [255]
31 $ hg revert -a
31 $ hg revert -a
@@ -35,7 +35,7 b' Try to operate on public mq changeset'
35 (see "hg help phases" for details)
35 (see "hg help phases" for details)
36 [255]
36 [255]
37 $ hg qfold bar
37 $ hg qfold bar
38 abort: cannot refresh public revision
38 abort: cannot qrefresh public revision
39 (see "hg help phases" for details)
39 (see "hg help phases" for details)
40 [255]
40 [255]
41 $ hg revert -a
41 $ hg revert -a
@@ -81,7 +81,7 b' qpop/qrefresh on the wrong revision'
81 abort: popping would remove a revision not managed by this patch queue
81 abort: popping would remove a revision not managed by this patch queue
82 [255]
82 [255]
83 $ hg qrefresh
83 $ hg qrefresh
84 abort: cannot refresh a revision with children
84 abort: cannot qrefresh a revision with children
85 [255]
85 [255]
86 $ hg tip --template '{rev} {desc}\n'
86 $ hg tip --template '{rev} {desc}\n'
87 3 append quux
87 3 append quux
@@ -243,7 +243,7 b' qpop'
243 $ hg -R sub update 0000
243 $ hg -R sub update 0000
244 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
244 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
245 $ hg qpop
245 $ hg qpop
246 abort: local changed subrepos found, refresh first
246 abort: local changed subrepos found, qrefresh first
247 [255]
247 [255]
248 $ hg revert sub
248 $ hg revert sub
249 reverting subrepo sub
249 reverting subrepo sub
@@ -262,7 +262,7 b' qpush'
262 $ hg -R sub update 0000
262 $ hg -R sub update 0000
263 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
263 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
264 $ hg qpush
264 $ hg qpush
265 abort: local changed subrepos found, refresh first
265 abort: local changed subrepos found, qrefresh first
266 [255]
266 [255]
267 $ hg revert sub
267 $ hg revert sub
268 reverting subrepo sub
268 reverting subrepo sub
@@ -869,7 +869,7 b' qpush failure'
869 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
869 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
870 patch failed, unable to continue (try -v)
870 patch failed, unable to continue (try -v)
871 patch failed, rejects left in working directory
871 patch failed, rejects left in working directory
872 errors during apply, please fix and refresh bar
872 errors during apply, please fix and qrefresh bar
873 [2]
873 [2]
874 $ hg st
874 $ hg st
875 ? foo
875 ? foo
General Comments 0
You need to be logged in to leave comments. Login now