-
Notifications
You must be signed in to change notification settings - Fork 1
Home
dominics edited this page Sep 13, 2010
·
9 revisions
- Get yourself a copy of the script merge_remaining and make it executable.
- Make sure you have svn (Subversion) installed on the machine where you’ll run the script, and make sure it’s a version with merge tracking (at least 1.5).
- Edit the script. There are a few lines at the top that you’ll probably want to edit: the location of the Subversion repository, the name of the default user commits will be shown for, and the default branch names.
Just run it. You’ll sometime want to pass in options (documented below).
merge_remaining will roughly look like this, but with a splash of color:
$ merge_remaining Finding eligible changes from trunk to branches/release Showing commits from dominic onlyr18983 | dominic | 2009-11-02 16:54:55 +1300 (Mon, 02 Nov 2009) | 2 lines Finished documentation build scriptr18987 | dominic | 2009-11-03 10:11:25 +1300 (Tue, 03 Nov 2009) | 2 lines Moved development databaser19049 | dominic | 2009-11-03 17:13:15 +1300 (Tue, 03 Nov 2009) | 2 lines Added helper to deal with error reportsr19050 | dominic | 2009-11-03 17:13:29 +1300 (Tue, 03 Nov 2009) | 3 lines Small typo in last commitr19105 | dominic | 2009-11-04 16:55:42 +1300 (Wed, 04 Nov 2009) | 3 lines Corrected user ID not being generated cleanlyr19132 | dominic | 2009-11-05 10:11:57 +1300 (Thu, 05 Nov 2009) | 2 lines Added new administration pageTo see the files changed in one of these revisions, do: svn log -vr REVISION https://svn.example.org/main/trunk To see the lines changed, do: svn diff -c REVISION https://svn.example.org/main/trunk | lessTo merge a revision from trunk to branches/release, go to a working copy of branches/release and do: svn merge -c REVISION https://svn.example.org/main/trunk If you're sure it has already been merged, go to a working copy of branches/release and do: svn merge -c REVISION https://svn.example.org/main/trunk --record-only
The script comes with detailed usage information:
$ merge_remaining --help
Usage: merge_remaining [--to] <branch_name> [--from <branch_name>] [--user <username>] [--all]
Shows revisions eligible to be merged into <branch_name> from another branch
Options:
-h --help Display this message
-t --to <branch_name> Show changes to be applied to the specified branch
-f --from <branch_name> Show changes from the specified branch (default: trunk)
-u --user <username> Show only changes by the specified user (default: this user)
-a --all Show changes by all users
-v --verbose Be noisy
-q --quiet Be quiet, and don't show log entriesEvery one of those options is optional, and merge_remaining should do a good job of guessing what you mean based on the defaults you entered when you edited the script. It’ll also announce what it’s trying to do and, if you specify --verbose, what Subversion commands it’s issuing.
- merge_remaining assumes you’re using a standard repository layout, with branches under /branches (e.g. /branches/release) and trunk at /trunk.
- merge_remaining is obviously not going to be very useful if you’re not making use of Subversion’s merge tracking support.