sapling/eden/scm/tests/test-fb-ext-smartlog-smallcommitmetadata.t
Saul Gutierrez 7f8e4f2439 hgext: rename ext to hgext
Summary: We since internally we will start to refer to `hg` as `sapling`, the `hgext` directory does not make that much sense now. This diff renames the `hgext` directory to `ext`, as well as all the references to it.

Reviewed By: jordanwebster

Differential Revision: D38914577

fbshipit-source-id: 2d01fc9ead26f309d9021ffe34e0812e0f2a13b7
2022-08-23 15:19:05 -07:00

47 lines
1.5 KiB
Perl

#debugruntest-compatible
$ setconfig workingcopy.ruststatus=False
$ 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.