Forks

Fork Actions on Change Set Listing Page

All fork actions are available directly on the change set listing page.

image ???

Creating Forks / Pull Requests

The following steps are applicable to all registered CodePlex users.

Step 1: Create a new Fork of a Project

  • Go to the Source Control tab of a Mercurial project.

  • Click on the “Create Fork” link.

  • Specify a name that will distinguish your intentions, and optionally enter in a description of what the fork is used for.

clip_image002

  • Once the fork has been created, you’ll be redirected to the “My Forks” view of that project.

  • At this point, you can toggle the view to see “All Forks” or “My Forks” (the toggle will only be visible if you have existing forks in the project).

clip_image004

Step 2: Fork Clone, Commit, and Push

  • On the page listing for the forks, you will see a Clone URL.

clip_image006

  • Use your favorite Mercurial tool (we recommend TortoiseHg), to create a local clone of the repository.

clip_image008

Since this is your repository, you have full capabilities of committing locally, and pushing changes back up to the central server. This is a key distinction for forks, as the changes in your fork ARE NOT pushed into the central project repository.

clip_image010

Step 3: Create a Pull Request

Once you have pushed all of your changes to your fork (as well as making sure you have pulled the latest changes from the central repository), you’re ready to create a pull request.

  • When viewing “My Forks”, you’ll see some actions.

  • Click on “Send Pull Request”, enter your comments and click “Send”.

clip_image012

  • At this point, your pull request is waiting to be applied by project coordinators or developers. Once they have applied or denied your pull request, you will receive an email with their comments.

Applying Pull Requests

The following steps are applicable to project coordinators or developers for a project only.

If you are a Mercurial project owner, and need to get access to unapplied patches, please contact us.

Step 1: Reviewing / Apply Pull Request

  • As a project contributor, when you visit the forks page, you’ll see that you have the ability to subscribe to pull request notifications.

  • When a user submits a pull request, you’ll receive an email with their comments and a link to the Fork.

clip_image014

  • Once a pull request has been submitted, you’ll want to pull those changes into your local project repository.

Note: It is recommended that you get fresh clone in case you wish to not accept the changes.

clip_image016

  • Once pulled, click the Refresh button in the Repository Explorer to see the new change set(s).

clip_image018

  • At this point, you should review the changes and determine if you’d like to accept them.

    • If you do not wish to accept the changes, you can simply delete your local repository and re-clone it.

    • If you do accept the changes, push them to the central project repository.

clip_image020

Step 2: Closing the Loop

No matter if you applied or declined the pull request, you should close the loop. This gives the user the reassurance that the pull request was noticed and acted upon.

To do this:

  • Visit the Forks page again. You’ll notice that we pop all pending pull requests on to the top so it’s easy to get access to them.

  • Find the pull request you just applied, and click “Apply Pull Request”.

  • Type a message and click Send.

clip_image022

Note: It’s courteous to give really good feedback when declining a pull request. The user is now able to send another pull request with new changes they’ve made to their fork.

Last edited Sep 3, 2010 at 10:20 PM by Ethetica, version 1

Comments

kamranm1200 Mar 5 at 3:47 PM 
Thank you for the useful tips, CodePlex team! :)

AlistairEdmunds Aug 1, 2012 at 11:50 AM 
heres a post that helped me with keeping the fork up to date. http://lostechies.com/jimmybogard/2012/04/02/working-with-forks-on-github-or-codeplex/

tommck Mar 10, 2012 at 1:59 PM 
I second dnovikov's question. Is there a way to keep the fork up to date while developing on your fork? I don't see anything in the UI for an update that direction.

dnovikov Feb 29, 2012 at 5:36 AM 
I wonder, if I create a fork, how do I keep the new fork repo synchronized with central repo, I mean, when somebody check-in some change into central repo, do I see it with pull request on my fork repo?

sebastienros Sep 8, 2010 at 6:13 PM 
If anyone wonders, clicking Accept Pull Request doesn't apply the changesets, it just sends a message to the developer, and closes the pull request. So you can safely push them without fearing it will be pushed again.