Mercurial > hg
diff tests/test-revset.t @ 46809:56d441256e82
revset: introduce a `nodefromfile` revset
I though we had one, but actually we don't seem to. So here is a revset to reuse
a list of node previously stored.
Differential Revision: https://phab.mercurial-scm.org/D10230
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 17 Mar 2021 20:06:35 +0100 |
parents | be3d8178251e |
children | 5ced12cfa41b |
line wrap: on
line diff
--- a/tests/test-revset.t Fri Mar 19 00:28:30 2021 -0400 +++ b/tests/test-revset.t Wed Mar 17 20:06:35 2021 +0100 @@ -3108,3 +3108,18 @@ $ log 'expectsize(0:2, :2)' abort: revset size mismatch. expected between 0 and 2, got 3 [255] + +Test getting list of node from file + + $ hg log -r '0:2' -T '{node}\n' > some.nodes + $ hg log -r 'nodefromfile("some.nodes")' -T '{rev}\n' + 0 + 1 + 2 + $ hg log -r 'nodefromfile("missing-file")' -T '{rev}\n' + abort: cannot open nodes file "missing-file": $ENOENT$ + [255] + $ echo bad-node > bad.nodes + $ hg log -r 'nodefromfile("bad.nodes")' -T '{rev}\n' + $ echo abcdefabcdefabcdeabcdeabcdeabcdeabcdeabc > missing.nodes +