Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2. Check out the branch

Code Block

svn co https://svn.apache.org/repos/asf/camel/branches/camel-2.8.x camel-2.8.x

3. In camel-2.8.x directory, you can get a list of commits available from the trunk

Code Block

svnmerge.py avail

4. Merge your commit by running

Code Block

svnmerge.py merge -r 123456

...

6. Commit it by running

Code Block

svn ci -F svnmerge-commit-message.txt

...

To run the file do, from the directory with the branch.

Code Block

java DoMerges

You need svnmerge.py to be runnable from the command line.

There is a compiled .class of the DoMerges attached to this wiki page you can download. However its easy to compile
the source file, as it has no other dependencies so its all plain

Code Block

javac DoMerges.java

Using git

...

Create a local branch from the remote tracking branch (e.g. camel-2.8.x)

Code Block

git checkout -b camel-2.8.x remotes/camel-2.8.x

or switch into the existing branch

Code Block

git checkout camel-2.8.x

To merge one revision (e.g. 1176050) into this branch, run

Code Block

git cherry-pick 1176050

This will merge and commit the changes into your local git repository.

Info
titleCombining multiple revisions

If you have to combine multiple revisions into one commit, run

Code Block

git cherry-pick -n <revision>

for each revision (the -n options prevents the commit after the merge). Afterwards you have to run

Code Block

git commit -a -m "<commit message>"

to commit all the changes with one commit into your local git repository.

Run

Code Block

git svn dcommit

to push your local changes into the Apache SVN repository.

...

Tip
titleGit Tooling

There is a number of Git Graphical Tools which can be used as well for backporting fixes. For example GitX or GitTower for Mac users.

Closing github PRs

The PRs at github is only automatic closed if the commit log has words like closes, fixes etc. And therefore we often ask the author of the PR to close the PR after it has been merged, or rejected. However the author may not see the notification or he/she does not react. So the Camel team can force close the PRs using an empty git message:

Code Block
git commit --allow-empty -m "This closes #xxxx"

You can then include multiple PRs etc. This closes #123. This closes #456.