Rockbox Development > Starting Development and Compiling

How to sync patches?

<< < (2/3) > >>

digerati1338:
OK so just to make sure I know what I'm doing:

1. I do a dry-run on a patch, and I see that it is out of sync.  No reject files are created in a dry run, so I have to apply the patch, then reverse-apply it so I keep my clean source?

2.  Check reject file, make necessary changes.

3.  Make a new unified diff.  I assume I need to use unpatched source when I do this?

cpchan:

--- Quote from: digerati1338 on July 18, 2007, 02:47:43 PM ---so I have to apply the patch, then reverse-apply it so I keep my clean source?
--- End quote ---

No, you should work with 2 trees- one is the clean pristine (unpatched) source and one is a working copy (for example "rockbox-new").


--- Quote ---Check reject file, make necessary changes.
--- End quote ---

You don't revert the patch. You have to see what is being rejected and modify the source code in your working copy.


--- Quote ---Make a new unified diff.  I assume I need to use unpatched source when I do this?
--- End quote ---

Yes, you make it against the upatched source.

Charles
 

bascule:

--- Quote from: cpchan on July 18, 2007, 03:18:48 PM ---No, you should work with 2 trees- one is the clean pristine (unpatched) source and one is a working copy (for example "rockbox-new")...

...Yes, you make it against the upatched source...

--- End quote ---

I don't think this is necessary. There is always a (hidden) clean tree available, as this is what SVN automatically does a diff against.

If you need it, you can always do make clean and this will use the clean tree.

cpchan:

--- Quote from: bascule on July 18, 2007, 03:57:38 PM ---I don't think this is necessary. There is always a (hidden) clean tree available, as this is what SVN automatically does a diff against.
--- End quote ---

Yes, you are correct. I should really start  learning and using Subversion. I am still doing things the old fashioned way.

Charles

bascule:

--- Quote from: digerati1338 on July 18, 2007, 02:47:43 PM ---OK so just to make sure I know what I'm doing:

1. I do a dry-run on a patch, and I see that it is out of sync.  No reject files are created in a dry run, so I have to apply the patch, then reverse-apply it so I keep my clean source?

2.  Check reject file, make necessary changes.

3.  Make a new unified diff.  I assume I need to use unpatched source when I do this?


--- End quote ---

You are correct, except for the reverse-apply.

You apply the patch and see if there are any rejects.

If so,  then ignore the patch file (it has done it's job) and modify the relevant source files that the patch made changes to.

Once it compiles cleanly, then do the diff to a (differently-named) .patch file in order to re-submit to Flyspray.

It's a bit confusing, but you'll get there in the end.

If all else fails, you can always do the revert -R command to remove all local edits and get back to a clean copy.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version