##// END OF EJS Templates
mq: avoid silent failure when single patch doesn't apply (issue4604)...
Matt Mackall -
r24826:9b02b678 stable
parent child Browse files
Show More
@@ -822,7 +822,7 class queue(object):
822 except AbortNoCleanup:
822 except AbortNoCleanup:
823 tr.close()
823 tr.close()
824 self.savedirty()
824 self.savedirty()
825 return 2, repo.dirstate.p1()
825 raise
826 except: # re-raises
826 except: # re-raises
827 try:
827 try:
828 tr.abort()
828 tr.abort()
@@ -880,7 +880,8 class queue(object):
880 touched = set(touched) & tobackup
880 touched = set(touched) & tobackup
881 if touched and keepchanges:
881 if touched and keepchanges:
882 raise AbortNoCleanup(
882 raise AbortNoCleanup(
883 _("local changes found, refresh first"))
883 _("conflicting local changes found"),
884 hint=_("did you forget to qrefresh?"))
884 self.backup(repo, touched, copy=True)
885 self.backup(repo, touched, copy=True)
885 tobackup = tobackup - touched
886 tobackup = tobackup - touched
886 (patcherr, files, fuzz) = self.patch(repo, pf)
887 (patcherr, files, fuzz) = self.patch(repo, pf)
@@ -1417,6 +1418,8 class queue(object):
1417 else:
1418 else:
1418 ret = self.apply(repo, s, list, all_files=all_files,
1419 ret = self.apply(repo, s, list, all_files=all_files,
1419 tobackup=tobackup, keepchanges=keepchanges)
1420 tobackup=tobackup, keepchanges=keepchanges)
1421 except AbortNoCleanup:
1422 raise
1420 except: # re-raises
1423 except: # re-raises
1421 self.ui.warn(_('cleaning up working directory...'))
1424 self.ui.warn(_('cleaning up working directory...'))
1422 node = repo.dirstate.p1()
1425 node = repo.dirstate.p1()
@@ -344,25 +344,29 test qpush --keep-changes
344 $ echo b >> b
344 $ echo b >> b
345 $ hg qpush --keep-changes
345 $ hg qpush --keep-changes
346 applying p3
346 applying p3
347 errors during apply, please fix and refresh p2
347 abort: conflicting local changes found
348 [2]
348 (did you forget to qrefresh?)
349 [255]
349 $ rm b
350 $ rm b
350 $ hg qpush --keep-changes
351 $ hg qpush --keep-changes
351 applying p3
352 applying p3
352 errors during apply, please fix and refresh p2
353 abort: conflicting local changes found
353 [2]
354 (did you forget to qrefresh?)
355 [255]
354 $ hg rm -A b
356 $ hg rm -A b
355 $ hg qpush --keep-changes
357 $ hg qpush --keep-changes
356 applying p3
358 applying p3
357 errors during apply, please fix and refresh p2
359 abort: conflicting local changes found
358 [2]
360 (did you forget to qrefresh?)
361 [255]
359 $ hg revert -aq b
362 $ hg revert -aq b
360 $ echo d > d
363 $ echo d > d
361 $ hg add d
364 $ hg add d
362 $ hg qpush --keep-changes
365 $ hg qpush --keep-changes
363 applying p3
366 applying p3
364 errors during apply, please fix and refresh p2
367 abort: conflicting local changes found
365 [2]
368 (did you forget to qrefresh?)
369 [255]
366 $ hg forget d
370 $ hg forget d
367 $ rm d
371 $ rm d
368 $ hg qpop
372 $ hg qpop
@@ -372,8 +376,9 test qpush --keep-changes
372 $ hg qpush -a --keep-changes
376 $ hg qpush -a --keep-changes
373 applying p2
377 applying p2
374 applying p3
378 applying p3
375 errors during apply, please fix and refresh p2
379 abort: conflicting local changes found
376 [2]
380 (did you forget to qrefresh?)
381 [255]
377 $ hg qtop
382 $ hg qtop
378 p2
383 p2
379 $ hg parents --template "{rev} {desc}\n"
384 $ hg parents --template "{rev} {desc}\n"
General Comments 0
You need to be logged in to leave comments. Login now