Closed Bug 1223451 Opened 9 years ago Closed 9 years ago

Remove & re-add RemoteNewTabUtils.jsm, test_RemoteNewTabUtils.js using "hg copy"

Categories

(Firefox :: New Tab Page, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(2 files)

While digging down an error-console-warning rabbit hole, I ran across RemoteNewTabUtils.jsm, which was added last month as a new file, despite being a near-identical copy of an existing file "NewTabUtils.jsm" Same goes for test_RemoteNewTabUtils.js. To preserve hg blame, these should really have been added using "hg copy". Happily, neither of these new files have been touched since they were added, so we have the ability to correct the record -- we can remove both files, and then add them back with "hg copy" + modifications (so that the source code won't be changed, but the hg metadata will be better). Filing this bug on doing that.
This has to be done in two separate patches -- first remove, then add back. (If I try to fold the two patches together into a single patch, hg trips over itself and generates an empty patch, because it's correctly seeing that the source isn't changing on the whole.) I can take this bug, since I'm already looking into things. Oliver, mind rubber-stamping the file-removal?
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8685508 - Flags: review?(oyiptong)
Here's "part 2" which adds these files back with "hg copy" to preserve blame and show the actual changes more clearly. I set Oliver as the patch-author in this patch's headers, so his changes will be correctly credited to him (not me), and I'm calling this "r=Mardak" since Mardak already reviewed these changes over in bug 1223443.
Attachment #8685510 - Flags: feedback?(oyiptong)
Note that Bugzilla's diff-viewer is slightly deceiving for patches that use "hg copy" (e.g. "part 2" here). It shows the patch as *modifying the original file* (the file that's being copied). Do not be fooled -- if you look at the patch itself, you can see that this really is a make-a-copy-and-modify-it operation -- e.g. you'll see this: > copy from toolkit/modules/NewTabUtils.jsm > copy to browser/components/newtab/RemoteNewTabUtils.jsm > --- a/toolkit/modules/NewTabUtils.jsm > +++ b/browser/components/newtab/RemoteNewTabUtils.jsm > @@ -1,15 +1,15 @@
Let me know if there are any other files in bug 1210940's commit that would benefit from this, too. From bug 1210940 comment 0, it looks like there *was* one other clear-candidate, RemoteDirectoryLinksProvider.jsm (a copy of DirectoryLinksProvider.jsm), but it looks like that duplicate has been removed elsewhere, in Bug 1214287.
(Also: as a sanity-check, I verified that "diff" finds 0 differences between a tree with these patches applied, vs. a tree without them applied.)
Attachment #8685508 - Flags: review?(oyiptong) → review+
Attachment #8685510 - Flags: feedback?(oyiptong) → feedback+
[For any future hg archeologists who come here by following "hg blame" on some RemoteNewTabUtils-related lines: you might really want to look at bug 1210940 and its commit https://hg.mozilla.org/mozilla-central/rev/8ea636dce7e6 , which is where this code was originally authored.]
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: