Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
pulkit |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | contrib/chg/chg.c (10 lines) | |||
M | tests/test-blackbox.t (2 lines) | |||
M | tests/test-merge-subrepos.t (2 lines) | |||
M | tests/test-setdiscovery.t (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
03637671566d | d63c01a3179d | Kyle Lippincott | Apr 30 2021, 6:33 PM |
return hgcmd; | return hgcmd; | ||||
} | } | ||||
static void execcmdserver(const struct cmdserveropts *opts) | static void execcmdserver(const struct cmdserveropts *opts) | ||||
{ | { | ||||
const char *hgcmd = gethgcmd(); | const char *hgcmd = gethgcmd(); | ||||
const char *baseargv[] = { | const char *baseargv[] = { | ||||
hgcmd, | hgcmd, "serve", "--no-profile", "--cmdserver", | ||||
"serve", | "chgunix", "--address", opts->initsockname, "--daemon-postexec", | ||||
"--no-profile", | |||||
"--cmdserver", | |||||
"chgunix", | |||||
"--address", | |||||
opts->initsockname, | |||||
"--daemon-postexec", | |||||
"chdir:/", | "chdir:/", | ||||
}; | }; | ||||
size_t baseargvsize = sizeof(baseargv) / sizeof(baseargv[0]); | size_t baseargvsize = sizeof(baseargv) / sizeof(baseargv[0]); | ||||
size_t argsize = baseargvsize + opts->argsize + 1; | size_t argsize = baseargvsize + opts->argsize + 1; | ||||
const char **argv = mallocx(sizeof(char *) * argsize); | const char **argv = mallocx(sizeof(char *) * argsize); | ||||
memcpy(argv, baseargv, sizeof(baseargv)); | memcpy(argv, baseargv, sizeof(baseargv)); | ||||
if (opts->args) { | if (opts->args) { |
> # (in addition, keeping it requires extra care for fsmonitor) | > # (in addition, keeping it requires extra care for fsmonitor) | ||||
> eol=! | > eol=! | ||||
> EOF | > EOF | ||||
$ hg blackbox -l 5 | $ hg blackbox -l 5 | ||||
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update (no-chg !) | 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update (no-chg !) | ||||
1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) | 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) | ||||
1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob) | 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob) | ||||
1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> update exited 0 after * seconds (glob) | 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> update exited 0 after * seconds (glob) | ||||
1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> serve --cmdserver chgunix --address $TESTTMP.chgsock/server.* --daemon-postexec 'chdir:/' (glob) (chg !) | 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> serve --no-profile --cmdserver chgunix --address $TESTTMP.chgsock/server.* --daemon-postexec 'chdir:/' (glob) (chg !) | ||||
1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 5 | 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 5 | ||||
log rotation | log rotation | ||||
$ echo '[blackbox]' >> .hg/hgrc | $ echo '[blackbox]' >> .hg/hgrc | ||||
$ echo 'maxsize = 20 b' >> .hg/hgrc | $ echo 'maxsize = 20 b' >> .hg/hgrc | ||||
$ echo 'maxfiles = 3' >> .hg/hgrc | $ echo 'maxfiles = 3' >> .hg/hgrc | ||||
$ hg status | $ hg status |
$ rm subrepo/b | $ rm subrepo/b | ||||
A deleted subrepo file is flagged as dirty, like the top level repo | A deleted subrepo file is flagged as dirty, like the top level repo | ||||
$ hg id --config extensions.blackbox= --config blackbox.dirty=True \ | $ hg id --config extensions.blackbox= --config blackbox.dirty=True \ | ||||
> --config blackbox.track='command commandfinish' | > --config blackbox.track='command commandfinish' | ||||
9bfe45a197d7+ tip | 9bfe45a197d7+ tip | ||||
$ cat .hg/blackbox.log | $ cat .hg/blackbox.log | ||||
* @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --cmdserver chgunix * (glob) (chg !) | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> serve --no-profile --cmdserver chgunix * (glob) (chg !) | ||||
* @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob) | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* (glob) | ||||
* @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob) | * @9bfe45a197d7b0ab09bf287729dd57e9619c9da5+ (*)> id --config *extensions.blackbox=* --config *blackbox.dirty=True* exited 0 * (glob) | ||||
TODO: a deleted file should be listed as such, like the top level repo | TODO: a deleted file should be listed as such, like the top level repo | ||||
$ hg sum | $ hg sum | ||||
parent: 4:9bfe45a197d7 tip | parent: 4:9bfe45a197d7 tip | ||||
change b | change b |
> EOF | > EOF | ||||
$ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \ | $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \ | ||||
> --config blackbox.track='command commandfinish discovery' | > --config blackbox.track='command commandfinish discovery' | ||||
comparing with r2 | comparing with r2 | ||||
searching for changes | searching for changes | ||||
101 102 103 104 105 106 107 108 109 110 (no-eol) | 101 102 103 104 105 106 107 108 109 110 (no-eol) | ||||
$ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track= | $ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track= | ||||
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !) | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --no-profile --cmdserver chgunix * (glob) (chg !) | ||||
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob) | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob) | ||||
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob) | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob) | ||||
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob) | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob) | ||||
$ cd .. | $ cd .. | ||||
Even if the set of revs to discover is restricted, unrelated revs may be | Even if the set of revs to discover is restricted, unrelated revs may be | ||||
returned as common heads. | returned as common heads. | ||||