0

I am a newbie currently trying to patch bugs in Firefox using Mercurial, Arcanist and Phabricator, but I'm having an on going issue that I can't figure out. Every time I create a new revision, All of the patches from my previous commits attach themselves to my newest revision. My basic workflow is listed below:

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

After making a change in the source code, I then commit my changes. For example:

hg add /path/to/file/changed
hg commit -m "Bug 1234567 - Implement feature XYZ. r=name,name2!"

Then I create a revision in Differential, using Arcanist:

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

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
JLAB
  • 1
  • Did you really mean `hg add` for a file that had *changed* ? – StayOnTarget Jul 10 '19 at 12:20
  • Thanks for the edit DaveInCaz. The "/path/to/file/changed" part was just an example I found in some documentation. Would it be better if I removed it? – JLAB Jul 10 '19 at 15:57
  • Sorry, I understood that was just an example. But you said you ADDED a file and also said that the file was only CHANGED. That seems like a contradiction. – StayOnTarget Jul 10 '19 at 16:43
  • 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. – JLAB Jul 11 '19 at 15:46
  • Sure, you could either use `hg strip` to just remove them, or you could use `hg update` to go to an earlier point in time and then just ignore them. If this is a brand new repo you could also just create a new one and start from there. – StayOnTarget Jul 11 '19 at 16:07
  • Thank you for the info DaveInCaz. I appreciate the help! – JLAB Jul 11 '19 at 17:12

0 Answers0