Show More
@@ -783,11 +783,10 b' class fixupstate(object):' | |||
|
783 | 783 | # nothing changed, nothing commited |
|
784 | 784 | nextp1 = ctx |
|
785 | 785 | continue |
|
786 | if ( | |
|
787 | self.skip_empty_successor | |
|
788 | and ctx.files() | |
|
789 | and self._willbecomenoop(memworkingcopy, ctx, nextp1) | |
|
790 | ): | |
|
786 | willbecomenoop = ctx.files() and self._willbecomenoop( | |
|
787 | memworkingcopy, ctx, nextp1 | |
|
788 | ) | |
|
789 | if self.skip_empty_successor and willbecomenoop: | |
|
791 | 790 | # changeset is no longer necessary |
|
792 | 791 | self.replacemap[ctx.node()] = None |
|
793 | 792 | msg = _(b'became empty and was dropped') |
@@ -798,7 +797,14 b' class fixupstate(object):' | |||
|
798 | 797 | nextp1 = lastcommitted |
|
799 | 798 | self.replacemap[ctx.node()] = lastcommitted.node() |
|
800 | 799 | if memworkingcopy: |
|
801 | msg = _(b'%d file(s) changed, became %s') % ( | |
|
800 | if willbecomenoop: | |
|
801 | msg = _( | |
|
802 | b'%d file(s) changed, became empty ' | |
|
803 | b'and became %s' | |
|
804 | ) | |
|
805 | else: | |
|
806 | msg = _(b'%d file(s) changed, became %s') | |
|
807 | msg = msg % ( | |
|
802 | 808 | len(memworkingcopy), |
|
803 | 809 | self._ctx2str(lastcommitted), |
|
804 | 810 | ) |
@@ -509,6 +509,7 b' Setting config rewrite.empty-successor=k' | |||
|
509 | 509 | $ hg commit -m b3 |
|
510 | 510 | $ echo 4 >> b |
|
511 | 511 | $ hg commit -m b4 |
|
512 | $ hg commit -m empty --config ui.allowemptycommit=True | |
|
512 | 513 | $ echo 1 > b |
|
513 | 514 | $ echo 3 >> a |
|
514 | 515 | $ hg absorb -pn |
@@ -527,16 +528,19 b' Setting config rewrite.empty-successor=k' | |||
|
527 | 528 | 1154859 b12 |
|
528 | 529 | bfafb49 a12 |
|
529 | 530 | $ hg absorb -av --config rewrite.empty-successor=keep | grep became |
|
530 |
0:bfafb49242db: 1 file(s) changed, became |
|
|
531 |
1:115485984805: 2 file(s) changed, became |
|
|
532 |
2:30970dbf7b40: 2 file(s) changed, became |
|
|
533 |
3:a393a58b9a85: 2 file(s) changed, became |
|
|
531 | 0:bfafb49242db: 1 file(s) changed, became 5:1a2de97fc652 | |
|
532 | 1:115485984805: 2 file(s) changed, became 6:0c930dfab74c | |
|
533 | 2:30970dbf7b40: 2 file(s) changed, became empty and became 7:df6574ae635c | |
|
534 | 3:a393a58b9a85: 2 file(s) changed, became empty and became 8:ad4bd3462c9e | |
|
535 | 4:1bb0e8cff87a: 2 file(s) changed, became 9:2dbed75af996 | |
|
534 | 536 | $ hg log -T '{rev} {desc}\n' -Gp |
|
535 | @ 7 b4 | |
|
537 | @ 9 empty | |
|
538 | | | |
|
539 | o 8 b4 | |
|
536 | 540 | | |
|
537 |
o |
|
|
541 | o 7 b3 | |
|
538 | 542 | | |
|
539 |
o |
|
|
543 | o 6 b12 | |
|
540 | 544 | | diff --git a/b b/b |
|
541 | 545 | | new file mode 100644 |
|
542 | 546 | | --- /dev/null |
@@ -544,7 +548,7 b' Setting config rewrite.empty-successor=k' | |||
|
544 | 548 | | @@ -0,0 +1,1 @@ |
|
545 | 549 | | +1 |
|
546 | 550 | | |
|
547 |
o |
|
|
551 | o 5 a12 | |
|
548 | 552 | diff --git a/a b/a |
|
549 | 553 | new file mode 100644 |
|
550 | 554 | --- /dev/null |
General Comments 0
You need to be logged in to leave comments.
Login now