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