User talk:Francis Galiegue

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)
Jump to navigationJump to search

Where Amanda has its sources

SVN: the reference source repository

[If you ARE an SVN committer and wish to use Git to clone/pull/push (resp. checkout/update/commit in SVN parlance) to the SVN repository, jump to the "Using git to clone the SVN repository" section below. This page WILL NOT give you any help on using SVN, tutorials are aplenty on the World Wi{de,ld} Web]

The reference Amanda source repository uses SVN. The base SVN URL is:

https://amanda.svn.sourceforge.net/svnroot/amanda/amanda

However, unless you are a commiter, you'll ever only have a read access to it. Otherwise you're better off starting with...

Git: never far behind

... The git repository on GitHub. This git repository is, at worst, less than a day behind the SVN repository. Its URL is https://github.com/zmanda/amanda. To clone it, just:

git clone git://github.com/zmanda/amanda.git

and you will have your own personal Amanda clone.

Should you choose to fork the repository using GitHub so that you can work on it and submit branches for review, follow the relevant instructions on GitHub and jump straight to the section "Adding remotes" below.

Using git to clone the SVN repository

For some time now, Git has had quite a complete interface to interact with SVN. However, both source control systems being quite different in their innards, SVN will only be a second hand citizen to the Git world.

Which doesn't prevent you from working with SVN, first of all by cloning the entire SVN repository (this operation is VERY long):

git svn clone -s --prefix=svn/ https://amanda.svn.sourceforge.net/svnroot/amanda/amanda

See below for more details on the different options used in this command line. When this command is completed, you will have a complete SVN clone just as if you had svn cloned the repository.

Git will also have created a master branch following SVN's trunk, but let's rename it to trunk:

git branch -m master trunk

Now, if you wish to develop using git, the best is still to base your work on GitHub's repo instead, so add this repository - or rather, this remote:

Adding remotes

A remote, in git parlance, is the URL to another git repository, from which you can fetch/merge/pull changes (and, if it's yours, push changes as well).

If you have chosen to git svn clone the repository to start with, you will want to add GitHub's main repository. Here is how you do it:

git remote add origin git://github.com/zmanda/amanda.git

You may also want to add other remotes pointing to other Amanda developers' git branches, for instance:

git remote add djmitche git://github.com/djmitche/amanda.git

and so on. If you have created your own fork on github, provided your username on github is xxxx, you will want to add your own remote as well:

git remote add xxxx [email protected]:xxxx/amanda.git

Once you have added all your remotes (and note that nothing prevents you from adding more further on), fetch changes from them:

git fetch --all

Now, unless you have chosen to clone directly from github, you won't have a master branch, create it:

git branch master origin/master

And check it out:

git checkout master

You are now ready to hack!

TIPS

TODO