How to accept contributions to your CodePlex project

Who is this for?

This document is for developers/coordinators on a CodePlex project that wish to accept and apply patches from the community.

Get the CodePlex Client

Download CodePlex Client (installation instructions).

Install a diff/merge tool

You will need to install a diff/merge tool in order to be able to validate your changes. Our configuration information contains pre-canned configuration items for many free (and a couple for-pay) diff/merge tools. I would strongly recommend you choose a tool which does 3-way merges. I personally use and love TortoiseMerge from TortoiseSVN. If you don't know which one to choose, you might start with that one.

Get a clean copy of the source code and apply the patch

You will want to apply the patch to a clean copy of the source code, rather than your current working area. Download a copy of the patch file from your project Source Code tab to your local disk (f.e., to C:\Patch.xml).
  1. Make a new directory
  2. Checkout a clean copy of the source code
  3. Apply the patch
C:\> md MyProjectSrc
C:\> cd MyProjectSrc
C:\MyProjectSrc> cpc checkout MyProject
[...checkout output...]
C:\MyProjectSrc> cpc applypatch C:\Patch.xml
[...patch output...]

Inspecting the patch results

The apply patch process will roll back individual files to the version that the person patched from, and then apply their differences. Note that these changes files remain the older version, so that it's easy to see the exact changes the user made. You can use "cpc status /gui" to view the changes using your installed GUI diff tool.

However, the codebase may have progressed since the patch was submitted, so they may not build properly any more. After you've inspected the patch results, and want to see how well they work, you should run "cpc syncup" to get all the source back to current versions. This may cause conflicts for files that have revved since the patch, so after running syncup, you will want to run "cpc status /gui" again to examine and resolve the conflicts with your installed GUI merge tool.

Happy with the patch?

If you're happy with the patch, you will want to take the following steps:

Not happy with the patch?

If you've decided to reject the patch, you will want to take the following steps: Note: Once a patch has been declined, only project coordinators/developers will be able to download it.

Cleaning up

Once you're done, you can delete the temporary folder you made for your source code.