##// END OF EJS Templates
mq: handle empty patches more gracefully (issue1501)
Matt Mackall -
r7782:14042927 default
parent child Browse files
Show More
@@ -551,9 +551,13 b' class queue:'
551 551 message.append(_("\nimported patch %s") % patchname)
552 552 message = '\n'.join(message)
553 553
554 if ph.haspatch:
554 555 (patcherr, files, fuzz) = self.patch(repo, pf)
555 556 all_files.update(files)
556 557 patcherr = not patcherr
558 else:
559 self.ui.warn(_("patch %s is empty\n") % patchname)
560 patcherr, files, fuzz = 0, [], 0
557 561
558 562 if merge and files:
559 563 # Mark as removed/merged and update dirstate parent info
@@ -583,10 +587,6 b' class queue:'
583 587 self.applied.append(statusentry(hex(n), patchname))
584 588
585 589 if patcherr:
586 if not ph.haspatch:
587 self.ui.warn(_("patch %s is empty\n") % patchname)
588 err = 0
589 else:
590 590 self.ui.warn(_("patch failed, rejects left in working dir\n"))
591 591 err = 1
592 592 break
@@ -30,6 +30,7 b' abort: cannot delete revision 2 above ap'
30 30 now at: b
31 31 abort: unknown revision 'c'!
32 32 applying c
33 patch c is empty
33 34 now at: c
34 35 c
35 36 3 imported patch c
@@ -486,8 +486,6 b' patch queue now empty'
486 486 abort: local changes found, refresh first
487 487 % apply force, should not discard changes with empty patch
488 488 applying empty
489 patch: **** Only garbage was found in the patch input.
490 patch failed, unable to continue (try -v)
491 489 patch empty is empty
492 490 now at: empty
493 491 diff -r bf5fc3f07a0a hello.txt
General Comments 0
You need to be logged in to leave comments. Login now