[Accepted] D11377: rhg: add support for calling `rhg cat` without a revision
SimonSapin
phabricator at mercurial-scm.org
Thu Sep 9 13:42:01 UTC 2021
SimonSapin added inline comments.
SimonSapin accepted this revision.
INLINE COMMENTS
> Alphare wrote in cat.rs:63
> > What should happen when p1 is null? (Such as in a new empty repository.) Is this case covered by tests?
>
> If `p1` is `nullrev`, it's the same path as any other revision, but if the dirstate does not exist, then it's an abort in the same way as `hg` does it. Should I add a testcase in `test-cat.t` or somewhere similar?
I guess I should have just tried it:
$ cd /tmp
$ hg init repo
$ cd repo
$ hg cat a
a: no such file in rev 000000000000
Indeed that look like the same code path. Still, yes adding that test sounds good.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11377/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11377
To: Alphare, #hg-reviewers, SimonSapin
Cc: SimonSapin, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210909/0452f819/attachment-0002.html>
More information about the Mercurial-patches
mailing list