Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DXR: How to search for a file that has since been removed from the tree?

24 views
Skip to first unread message

Philip Chee

unread,
Aug 26, 2016, 4:25:57 PM8/26/16
to
I need to look at the history of a file that has since been removed from
the tree. Can DXR help me track this down?

Phil

--
Philip Chee <phi...@aleytys.pc.my>, <phili...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.

Gregory Szorc

unread,
Aug 26, 2016, 4:41:23 PM8/26/16
to Philip Chee, dev-platform
You can construct URLs like:

https://hg.mozilla.org/mozilla-central/log/default/dom/canvas/WebGLContextReporter.cpp

`hg log <path>` will also show the history of a known path ever under
version control.

The query should be very fast (even if the path disappeared hundreds of
thousands of commits ago) because Mercurial stores file data by its path.
Contrast with Git, where it has to resolve trees for all commits until it
can find a reference to a path.

$ time hg log dom/canvas/WebGLContextReporter.cpp > /dev/null
0.110s real

$ time git log -- dom/canvas/WebGLContextReporter.cpp > /dev/null
3.175s
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Erik Rose

unread,
Aug 26, 2016, 4:54:44 PM8/26/16
to Philip Chee, dev-pl...@lists.mozilla.org
> Can DXR help me track this down?

And the short answer: no, DXR is for only one point in time so far.

Jim Blandy

unread,
Aug 26, 2016, 4:56:28 PM8/26/16
to Gregory Szorc, Philip Chee, dev-platform
On Fri, Aug 26, 2016 at 1:41 PM, Gregory Szorc <g...@mozilla.com> wrote:

> $ time hg log dom/canvas/WebGLContextReporter.cpp > /dev/null
> 0.110s real
>
> $ time git log -- dom/canvas/WebGLContextReporter.cpp > /dev/null
> 3.175s
>

Yes --- For similar reasons, CVS handled this case very well too! [angelic
smile]
0 new messages