patch-instructions-mercurial

Creating a patch for PETSc using Mercurial

Clone the Repository

If you haven't already, the first step is to obtain a recent copy of the PETSc repository:

 $> hg clone https://bitbucket.org/petsc/petsc   #UPDATE THIS!
 $> cd petsc/

This creates a new folder 'petsc' containing the development repository and changes right into it.

Start Cleanly

If all the changes you applied to the PETSc code should enter the patch, proceed to the next section.

Otherwise, if you have already cloned the repository at some earlier stage and played around with it, but you don't want to keep any of your changes to files, reset the current work tree using

 $:petsc> hg revert --all

To selectively bring files back to their original state, first run

 $:petsc> hg status

to get a list of modified files (line starting with 'M'). For each file f to be reverted, issue

 $:petsc> hg revert path/to/f

Apply your Changes

If you haven't already, apply all the changes to the sources which should go into the patch. Please try to make a patch self-contained, dealing with only one aspect or module at a time (for example: Fixes to documentation).

Commit your Changes

Once you completed updating the source tree, let's first check a summary of changed files:

  $:petsc> hg status

If all the files shown as 'modified' should indeed be patched, commit you work using

  $:petsc> hg commit -m "Your commit message here"

Create the patch

Once your commit is completed, the changes with respect to master need to be extracted. To write the patch to a file myFeature1.patch, use

  $:petsc> hg export tip > myFeature1.patch

Send it over

Please send the newly created patch file(s) to petsc-dev@mcs.anl.gov

Updated

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.