yuja added a comment.
> \What I originally thought was `shortest` may have alternative
implementation if the changelog is not backed by revlog (in the far far future).
Okay, got it. Even if it's backed by revlog, shortest can be implemented as a
one-pass
lookup of prefix tree.
REPOSIT
quark added a comment.
Oops. What I originally thought was `shortest` may have alternative
implementation if the changelog is not backed by revlog (in the far far
future). So it feels the current implementation (using revlog's partialmatch)
belongs to revlog itself.
REPOSITORY
rHG Mercuri
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9a137d15d146: templater: extract shortest() logic from
template function (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7
yuja accepted this revision.
yuja added a comment.
This revision is now accepted and ready to land.
Queued, thanks.
I slightly prefer moving shortest() to scmutil as it seems not a core function
of revlog, but that's just my preference.
REPOSITORY
rHG Mercurial
REVISION DETAIL
http
martinvonz added a comment.
In https://phab.mercurial-scm.org/D724#12091, @quark wrote:
> It might make sense to be a revlog method if we don't really care about the
"cleanness" of revlog class. I slightly prefer that.
Heh, that's what I decided to do. I apparently forgot to send
martinvonz updated this revision to Diff 1860.
martinvonz edited the summary of this revision.
Herald added a reviewer: indygreg.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D724?vs=1859&id=1860
REVISION DETAIL
https://phab.mercurial-scm.org/D724
AFFE
quark accepted this revision.
quark added a comment.
It might make sense to be a revlog method if we don't really care about the
"cleanness" of revlog class. I slightly prefer that.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D724
To: martinvonz, #hg-reviewer
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
It can be useful for extensions to be able to produce the shortest
unambiguous hash. That logic is currently inside the shortest()
template function. Let's mo