Submitter | phabricator |
---|---|
Date | Nov. 22, 2019, 9:21 a.m. |
Message ID | <differential-rev-PHID-DREV-xtpo3iwr5axhclvnkcgt-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/43419/ |
State | Superseded |
Headers | show |
Comments
> + if specs == [b'null']: > + return revset.baseset([nullrev]) This breaks `--config revsetalias.null=<whatever>`. Nobody would care, but I don't know why we're so hard to optimize `-r null` query.
yuja added a comment. > + if specs == [b'null']: > + return revset.baseset([nullrev]) This breaks `--config revsetalias.null=<whatever>`. Nobody would care, but I don't know why we're so hard to optimize `-r null` query. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7481/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7481 To: marmoute, #hg-reviewers, indygreg Cc: yuja, mjpieters, mercurial-devel
marmoute added a comment. In D7481#110524 <https://phab.mercurial-scm.org/D7481#110524>, @yuja wrote: >> + if specs == [b'null']: >> + return revset.baseset([nullrev]) > > This breaks `--config revsetalias.null=<whatever>`. Nobody would care, but > I don't know why we're so hard to optimize `-r null` query. I woudl says that changing `null` (like changing `.`) is calling for troubles and I would not worries. optimising `null` is a good intermediate steps on the path to optimizing `.`; it also seems a possibly common request for automation. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7481/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7481 To: marmoute, #hg-reviewers, indygreg Cc: yuja, mjpieters, mercurial-devel
Patch
diff --git a/tests/test-repo-filters-tiptoe.t b/tests/test-repo-filters-tiptoe.t --- a/tests/test-repo-filters-tiptoe.t +++ b/tests/test-repo-filters-tiptoe.t @@ -49,5 +49,4 @@ $ hg init test-repo $ cd test-repo $ hg log -r null -T "{node}\n" - debug.filters: computing revision filter for "visible" 0000000000000000000000000000000000000000 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1652,6 +1652,8 @@ definitions overriding user aliases, set ``localalias`` to ``{name: definitionstring}``. ''' + if specs == [b'null']: + return revset.baseset([nullrev]) if user: m = revset.matchany( self.ui,