RedmineVersion » History » Version 4

Chris Cannam, 2010-11-19 01:23 PM

1 2 Chris Cannam
h1. Which version of Redmine?
2 1 Chris Cannam
3 1 Chris Cannam
Our Redmine installation is made from a version maintained in an Hg repository (see "the Repository tab for this project":https://code.soundsoftware.ac.uk/projects/soundsoftware-site/repository).
4 1 Chris Cannam
5 1 Chris Cannam
This currently has two branches: @default@ and @yuya@.
6 1 Chris Cannam
7 1 Chris Cannam
The @default@ branch tracks Redmine trunk (we carry out an actual SVN checkout on top of the repo and commit the entire .svn tree).
8 1 Chris Cannam
9 1 Chris Cannam
The @yuya@ branch contains the Redmine Mercurial overhaul patches from Yuya Nishihara described at "Redmine issue 4455":http://www.redmine.org/issues/4455.  This branch is the one that is actually used in the "production" site, and we merge to it from default each time we update default from trunk.
10 1 Chris Cannam
11 1 Chris Cannam
The aim is to track the Redmine trunk until Yuya's Mercurial overhaul patches are merged into trunk, and then to stop tracking the trunk at the next subsequent stable release.
12 3 Chris Cannam
13 3 Chris Cannam
h2. How to update to Redmine trunk
14 3 Chris Cannam
15 4 Chris Cannam
Example: I start out doing some work in my test server, on the @cannam@ branch.  I want to update the version of Redmine that my branch is based on.
16 3 Chris Cannam
17 4 Chris Cannam
The way we track Redmine SVN is simple but gross.  We simply have all the .svn directories checked in to Hg, so the whole thing is a working SVN repository.  We use the @default@ branch for tracking the upstream SVN -- this is its only function.  Note in particular that we never, ever merge from Hg branches _to_ the @default@ branch.  Arguably it should have a better name than @default@...
18 1 Chris Cannam
19 4 Chris Cannam
So.  First, we clone a *new copy* of our repository.  Why?  Because there are some files in the live instance that we _don't_ keep in Hg, for example copyrighted fonts and some scripts and config files with database passwords in them.  What we want to do is update the SVN code and then use @hg addremove@ to add to Hg anything that has appeared since we last updated.  This won't work if we have additional untracked stuff in the directory as well, because all of it will be added too.
20 1 Chris Cannam
21 4 Chris Cannam
We'll clone our current copy rather than the master copy, because it's simpler -- then we just use the default target of @hg push@ to push back to the current copy for checking, before we push back to the remote master.  Our cloned copy is going to be very temporary so let's just do it in @/tmp@.
22 4 Chris Cannam
23 4 Chris Cannam
@/var/www/test-cannam$ cd /tmp@
24 4 Chris Cannam
25 4 Chris Cannam
@/tmp$ hg clone /var/www/test-cannam work@
26 4 Chris Cannam
27 4 Chris Cannam
@/tmp$ cd work@
28 4 Chris Cannam
29 4 Chris Cannam
Now make sure we're on the right branch:
30 4 Chris Cannam
31 4 Chris Cannam
@/tmp/work$ hg update default@