##// END OF EJS Templates
absorb: preserve changesets which were already empty...
Manuel Jacob -
r45518:1ca0047f default
parent child Browse files
Show More
@@ -782,7 +782,9 b' class fixupstate(object):'
782 # nothing changed, nothing commited
782 # nothing changed, nothing commited
783 nextp1 = ctx
783 nextp1 = ctx
784 continue
784 continue
785 if self._willbecomenoop(memworkingcopy, ctx, nextp1):
785 if ctx.files() and self._willbecomenoop(
786 memworkingcopy, ctx, nextp1
787 ):
786 # changeset is no longer necessary
788 # changeset is no longer necessary
787 self.replacemap[ctx.node()] = None
789 self.replacemap[ctx.node()] = None
788 msg = _(b'became empty and was dropped')
790 msg = _(b'became empty and was dropped')
@@ -587,3 +587,21 b' This should move us to the non-obsolete '
587 b | 0
587 b | 0
588 2 files changed, 1 insertions(+), 0 deletions(-)
588 2 files changed, 1 insertions(+), 0 deletions(-)
589
589
590
591 $ cd ..
592 $ hg init repo8
593 $ cd repo8
594 $ echo a1 > a
595 $ hg commit -m a -A a
596 $ hg commit -m empty --config ui.allowemptycommit=True
597 $ echo a2 > a
598 $ hg absorb --apply-changes --verbose | grep became
599 0:ecf99a8d6699: 1 file(s) changed, became 2:7e3ccf8e2fa5
600 1:97f72456ae0d: 1 file(s) changed, became 3:2df488325d6f
601 $ hg log -T '{rev} {desc}\n' -G --stat
602 @ 3 empty
603 |
604 o 2 a
605 a | 1 +
606 1 files changed, 1 insertions(+), 0 deletions(-)
607
General Comments 0
You need to be logged in to leave comments. Login now