sapling/eden/scm/tests/test-fb-hgext-smartlog-smallcommitmetadata.t
Jun Wu 9bf6b674a6 config: use Rust graph render as default
Summary: Change the legacy Python graph render to Rust renderer.

Reviewed By: DurhamG

Differential Revision: D24317802

fbshipit-source-id: 4c3dc3a6dd02b7ebe79596a8e77f4b6b139d2e20
2020-10-19 17:07:30 -07:00

49 lines
1.6 KiB
Perl

#require py2
$ configure modern
$ enable smartlog
$ newserver master
$ cat >> .hg/hgrc <<EOF
> [alias]
> sl = smartlog -T '{sl}'
> [templatealias]
> sl_stablecommit = "{label('sl.stablecommit', smallcommitmeta('arcpull_stable'))}"
> sl_hash_minlen = 8
> sl_phase_label = "{ifeq(phase, 'public', 'sl.public', 'sl.draft')}"
> sl_node = "{label(sl_phase_label, shortest(node, sl_hash_minlen))}"
> sl = "{label('sl.label', separate('\n', sl_node, sl_stablecommit, '\n'))}"
> EOF
$ hg debugsmallcommitmetadata
Found the following entries:
$ echo "a" > a ; hg add a ; hg commit -qAm a
$ echo "b" > b ; hg add b ; hg commit -qAm b
$ echo "c" > c ; hg add c ; hg commit -qAm c
Add some metadata
$ hg debugsmallcommitmetadata -r cb9a9f314b8b -c arcpull_stable stable
$ hg debugsmallcommitmetadata -r d2ae7f538514 -c bcategory bvalue
$ hg debugsmallcommitmetadata -r 177f92b77385 -c ccategory cvalue
$ hg debugsmallcommitmetadata
Found the following entries:
cb9a9f314b8b arcpull_stable: 'stable'
d2ae7f538514 bcategory: 'bvalue'
177f92b77385 ccategory: 'cvalue'
Verify smartlog shows only the configured data
$ hg debugsmallcommitmetadata
Found the following entries:
cb9a9f314b8b arcpull_stable: 'stable'
d2ae7f538514 bcategory: 'bvalue'
177f92b77385 ccategory: 'cvalue'
$ hg sl
@ 177f92b7
o d2ae7f53
o cb9a9f31
stable
note: background backup is currently disabled so your commits are not being backed up.
abort: none of 'infinitepushwrite', 'infinitepush', 'default' repositories configured!
(see 'hg help config.paths')
[255]