Importing a Mercurial Patch from Someone Else
The purpose of this page is to help you import a patch from someone else.
Prerequisites
- You should have your development environment set up.
- Your development environment should be updated to the correct branch (hg update [branchname])
- You should have a .hgrc file that looks like the one on this page.
How to Import a Patch
You can import a patch without making a commit by issuing the command:
hg import --no-commit PATCH_FILE
iDempiere patches often include changes to the application dictionary. These will be placed in your repository's migration folder. You can use my upgrade script to apply your changes. The -s tells the script to skip the binaries. The -m says to use the development environments migration script (as opposed to downloading them from the current project's head).
/opt/idempiere-server/chuboe_utils/chuboe_idempiere_upgrade.sh -s -m /home/ubuntu/dev/myexperiment/migration/
You can unwind/remove changes made by your patches (assuming they are not committed) by issuing the commands:
hg revert --all
If the patch added files, you can remove them by issuing the command:
hg purge
The above purge command only works if you have added purge as an extension to your home directory's .hgrc. Here is an example.
If you accidentally committed a change, you can issue the commnad:
hg rollback
Here is more information about fixing mistakes