Closed Bug 1563680 Opened 4 years ago Closed 4 years ago

Move network monitor actors into network-monitor directory

Categories

(DevTools :: Netmonitor, task, P3)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: Honza, Assigned: vanhagarsux)

References

Details

(Keywords: good-first-bug)

Attachments

(1 file)

Network monitor actor files:

  • network-monitor.js
  • network-event.js

... should be moved into devtools/server/actors/network-monitor directory. This way we'll have all the Network monitor back-end nicely at one place.

Honza

Keywords: good-first-bug
Priority: -- → P3

Hi Jan,

Im pretty new to patching bugs and I’ve been looking into this bug. I think this might be a good next bug for me to work on. I found the files on my local build:

C:\mozilla-source\mozilla-central\devtools\server\actors\network-monitor.js
C:\mozilla-source\mozilla-central\devtools\server\actors\network-event.js

but I’m not sure how you would create a patch to have them moved to a different folder? Any guidance would be appreciated.

Thanks,
J

I assume that when I move the files locally to devtools/server/actors/network-monitor, commit those changes, and then create a differential revision, it will recognize the differences in the path and that is all that is needed for the patch? Let me know if this is correct and I'll make the changes.

Thanks,
J

(In reply to J from comment #2)

I assume that when I move the files locally to devtools/server/actors/network-monitor, commit those changes, and then create a differential revision, it will recognize the differences in the path and that is all that is needed for the patch? Let me know if this is correct and I'll make the changes.

Correct, but use hg mv for moving the files, so we keep history.
You also need to update moz.build files presented in related directories (this file lists all the files in dir for mozilla build system)

Honza

Thanks for the info Honza. I'll create a revision when I get a chance. Could you please assign me this bug then?

Thanks,
J

Done
Honza

Assignee: nobody → vanhagarsux
Status: NEW → ASSIGNED

Hi Honza,

I was able to move the files for a commit, but I'm having an on going issue that I can't figure out. Every time I create a new revision, all of the previous patches I worked on attach themselves to this newest revision. You can see it happening in my last revision here:

https://phabricator.services.mozilla.com/D36550

My last reviewer, gl, thought that using bookmarks might solve my issue, but I tried creating one for this patch but it didn't solve the issue. Any Idea on why this merging of my previous commits might be happening? Here is my current workflow:

From /c/mozilla-source/mozilla-central:

hg bookmark bug1563680

hg mv devtools/server/actors/network-monitor.js devtools/server/actors/network-monitor/network-monitor.js
hg mv devtools/server/actors/network-event.js devtools/server/actors/network-monitor/network-event.js

./mach build
./mach run

hg add devtools/server/actors/network-monitor/network-monitor.js devtools/server/actors/network-monitor/network-event.js

hg commit -m "Bug 1563680 - Move network monitor actor files into the network-monitor directory r=Honza"

arc diff

I feel like I'm missing a step either at the beginning of the process or at the end, do I need to clean up or clear out something after creating a revision in Differential using arc diff? I noticed when I do run arc diff and my editor opens to have me fill in info, the text file template is already filled with data from the old commit messages. So it seems to be automatically attaching these old patches for some reason.

Any guidance would be greatly appreciated,
J

Not sure when the problem is, but couple of comments:

  1. Make sure that your patches are not committed (especially when you used HG queues, which are broken)
    Use hg log to check the history (or clone the source again)

  2. When you want to update an existing phab revision use --update
    Example: arc diff .^ --update D<yourrev#> this should send only the last commit to phab
    You might also use: arc diff .^ --update D<yourrev#> --trace to get more output info

Honza

Hi Honza,

Is it possible to just delete all of my local commits safely and start from scratch? Since I’ve only done a couple of patches, I’m thinking that working with a clean slate might be the easiest and best way forward.

Thanks,
J

Yes, you can use hg strip tip to remove the last commit (tip)
Or, if you have trouble to get to the clean state, you can clone the repo again
hg clone https://hg.mozilla.org/mozilla-central/

(don't forget to backup your changes)

Honza

Hi Honza,

Thank you for the info. So I should backup my changes for either option, using hg strip tip or cloning the repo again? How do I go about backing up my changes?

Thank you,
J

Since this bug is only about moving two files to different dir, I don't think that there is so much changes.

I don't know in what state your repo is, so cloning it again sounds to me like the way to go.

Honza

Moved network monitor actor files:

network-monitor.js
network-event.js

into devtools/server/actors/network-monitor directory.

And updated moz.build files presented in related directories.

Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/209c91065bfb
Move network monitor actor files into the network-monitor directory r=Honza
Backout by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a2cd0c66786a
Backed out changeset 209c91065bfb for causing mochitest failures CLOSED TREE

Comments in Phab
Honza

Flags: needinfo?(vanhagarsux)
Regressions: 1567080
Flags: needinfo?(vanhagarsux)
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47a9a289491e
Move network monitor actor files into the network-monitor directory r=Honza
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.