sapling/eden/scm/tests/test-smartlog-collapse-obsolete.t
Jun Wu dac395b3ce smartlog: collapse obsoleted stack
Summary:
When rebasing a long stack, it's common to have a long obsoleted (`x`) stack.
The `x` stack is likely duplicated with their successors therefore generally
not that useful. They take a lot of space, making it harder to find useful
commits. Collapse them in smartlog output by only showing their heads and
roots.

This is disabled for automation as VSCode @ FB has issues rendering the
"unstable" commits.

Screenshot of before vs after:
{F242018914}

Reviewed By: markbt

Differential Revision: D22289661

fbshipit-source-id: 1afce073e14abe8c23a05d52d60847fc5e0bfb66
2020-07-01 21:35:36 -07:00

77 lines
759 B
Perl

#chg-compatible
$ enable rebase smartlog
$ newrepo
$ drawdag << 'EOS'
> G
> |
> F
> |
> E
> |
> D
> |
> C
> |
> B Z
> |/
> A
> EOS
$ hg bookmark -r $Z master
$ hg bookmark -r $G old
$ hg bookmark -r $F new
$ hg rebase -qr $C::$F -d $Z
The obsoleted C::F should be collapsed:
$ hg sl -T '{desc}' --config smartlog.collapse-obsolete=true
o F
|
o E
|
o D
|
o C
|
o Z
|
| o G
| |
| x F
| :
| x C
| |
| o B
|/
o A
The feature can be turned off:
$ hg sl -T '{desc}' --config smartlog.collapse-obsolete=false
o F
|
o E
|
o D
|
o C
|
o Z
|
| o G
| |
| x F
| |
| x E
| |
| x D
| |
| x C
| |
| o B
|/
o A