Print This Page

This is an experimental repository for developing omvviewer a version of the SecondLife viewer for debian. topgit is being used to manage the patch stack as proper git controlled branches and also to generate a debain package directly from these git branches, forming quilt patches in the debian source package.

topgit 0.5 and git are required to access this repository

Topgit Branch structure

Branches:
upstream                        : Clean upstream release.
master                          : Upstream + debian/ directory, no patches.
topic                           : Topic branches.
build                           : Local branch used generate debian/patches etc in so that debian/rules build works.
[..other local branches..] 
topic/debian                    : Debian specific patches (that will go into the debian package).
topic/fixes                     : Bug fixes.
topic/features                  : New features.
topic/pandora                   : Things that we want to share, but that should not go in the debian package, nor be sent upstream.
topic/{fixes,features,...}/new                  : Patches that you or I are working on.
topic/{fixes,features,...}/jira-sent            : .. and are sent upstream (attached to a jira report).
topic/{fixes,features,...}/jira-backported      : Patches that are in LL's queue.
topic/{fixes,features,...}/thirdparty           : Patches written by others, except LL.

 Cloning the repository (developer)

1. Create a ssh key pair and send the pub key to Robin
2. Set a ~/.ssh/config with something like :-
Host slviewer git.byteme.org.uk
HostName git.byteme.org.uk
User username
3. git clone git.byteme.org.uk/home/git/slviewer.git
4. cd slviewer
5. tg remote --populate origin 
6. git-checkout -b upstream origin/upstream
7. git-checkout -b scripts origin/scripts
8. git-checkout -b pristine-tar origin/pristine-tar

Cloning the repository (non-developer)

1. git clone http://git.byteme.org.uk/slviewer.git
2. cd slviewer
3. tg remote --populate origin 
4. git-checkout -b upstream origin/upstream
5. git-checkout -b scripts origin/scripts
6. git-checkout -b pristine-tar origin/pristine-tar

Creating a new topic branch

tg create topic/branchname upstream
nano .topmsg (edit file to contain description)
...hack away....
git-status (check things look sane) 
git commit -a (optional -m "some commit message")
git push

Notes branches under topic/debian/* should be based on master NOT upstream as per the last example.

Importing existing patches

The script tg-import-patch in the repository under scripts/ is a helper for this, you must be on branch scripts for this to work

tg-import-patch /path/to/existing/patch.diff -o /topic/fixes/jira-sent/ 
where the -o option is the topic branch to add the patch to. The patch name will be appended to form the full topic branch name.

 

Getting new topic branches from origin repository

git-checkout master
git pull
tg remote --populate origin 
note i believe you should not be on a topic branch when you do this operation

Do some work on a topic branch

git checkout topic/branchname
!do lots of work!
git add changed_file
git commit -m "Commit message"
git push

Do some work on master branch

git checkout master
!do lots of work!
git add changed_file
git commit -m "Commit message"
git checkout scripts
scrips/tg_update_all
git push

Building

Note the debian rules script contains a makefile snipit that automaticly takes all the topgit topic branches and generates debian/patches/* and a debian/patches/seriese for quilt to apply.

git-checkout build (if build does not exist yet for you create it from master)
git merge master
make -f debian/rules build

Merging a new upstream

#start on a clean master branch
git-import-orig --pristine-tar /path/to/new/source.tar.gz -u0.1.2   (where 0.1.2 is the upstream version number)
tg-update-all #(note this is a custom script within our scripts branch)
#for every CONFLICT, either
# 1)edit ALL conflict files looking for <<<< ==== >>>> conflict markers, fixing the issues then
git commit -a 
# 2) Remove the topic branch if it is no longer required (applied upstream)
tg delete -f topic///branch_name
# re run rg-update-all to continue
tg-update-all