Searchfox doesn't show blame for browser.xhtml from before it was `hg mv -f`ed from browser.xul
Categories
(Webtools :: Searchfox, defect)
Tracking
(Not tracked)
People
(Reporter: bgrins, Unassigned)
References
Details
This file was renamed from browser.xul to browser.xhtml in Bug 1553188 / https://hg.mozilla.org/integration/mozilla-inbound/rev/ef4ae83cd3f7.
Here's the file on searchfox, notice that the blame on the left is only from the initial move and subsequent commits: https://searchfox.org/mozilla-central/source/browser/base/content/browser.xhtml
The blame does exist on hg - it can be seen at https://hg.mozilla.org/mozilla-central/annotate/tip/browser/base/content/browser.xhtml.
Some other discussion about this: https://groups.google.com/d/msg/firefox-dev/7geUpMu5Hxk/5VJhoentCAAJ and https://bugzilla.mozilla.org/show_bug.cgi?id=1553188#c19.
Reporter | ||
Comment 1•6 years ago
|
||
I suspect this has something to do with the browser.xhtml file having already existed before (and the -f
in hg mv
being passed). Other more straightforward file renames like hiddenWindow.xul -> hiddenWindowMac.xhtml (Bug 1551334 / https://searchfox.org/mozilla-central/source/browser/base/content/hiddenWindowMac.xhtml) preserve the blame in searchfox.
Comment 2•6 years ago
•
|
||
We use a git mirror of m-c to generate blame data, and git doesn't store file moves explicitly like hg does. Presumably you used the -f
to hg mv
to make it explicitly realize this is a file move, despite a large diff between the two versions. The large diff probably results in git not recognizing it as a file move either. Proabably if we regenerated the blame repo with different parameters for the file copy/move detection we could correct this.
I do plan on regenerating the blame repo at some point to fix bug 1431906 so maybe I can experiment with better parameters at that point.
Comment 3•5 years ago
•
|
||
For future reference, we need to set the --break-rewrites
option or equivalent in order for git to detect this as a file rename. The reason is that the browser.xhtml file existed already, and so git treats that file as "modified" rather than "added" and so it doesn't treat that file as a destination for copies/renames. By using --break-rewrites
the self-similarity of browser.xhtml is low enough that the "modified" gets broken into an "delete/add" pair and the "add" half of that can get matched with the browser.xul "delete" to form a rename pair.
Comment 4•4 years ago
|
||
I finished rebuilding the blame with the modified parameters and now you can follow browser.xhtml blame all the way back. Marking fixed.
Description
•