... | ... | @@ -84,10 +84,20 @@ Get the last version of the development tree (git or subversion), and import thi |
|
|
|
|
|
##### Command-line git-svn method
|
|
|
|
|
|
###### Handling of branches and tags
|
|
|
|
|
|
In subversion, branches and tags are kind of symlinks to snapshots of the development history. They can be put anywhere in the repository directory hierarchy, but usually it is advised to gather them in specific directories, and the recommended best practice is the standard layout of three top directories in the subversion repository: `trunk` (main development tree), `tags`, `branches`.
|
|
|
|
|
|
By default git-svn just clones the repository 'as-is', (you'll end up with a migrated repository in git with exactly that structure, `trunk`, `tags`, `branches`, and no git branches nor git tags).
|
|
|
|
|
|
But you almost always want to convert subversion branches and tags to git branches and tags. git-svn takes options to set the directories for branches and tags. If your subversion repository has the classic standard layout structure, you can use the shorthand option `--stdlayout` to convert all svn branches in `branches` and all svn tags in `tags` to git ones (if your repository has a non standard layout, there are options to instruct git-svn of the layout, see git-svn documentation).
|
|
|
|
|
|
###### git-svn command
|
|
|
|
|
|
Checkout the subversion repository with git-svn (https://git-scm.com/docs/git-svn). It creates a git repository from the subversion repository (with all the history). You can then add your gitlab project as a git remote and push to that project:
|
|
|
|
|
|
```
|
|
|
git svn clone svn+ssh://<forge_user>@scm.gforge.inria.fr/svnroot/<forge_project>/
|
|
|
git svn --stdlayout clone svn+ssh://<forge_user>@scm.gforge.inria.fr/svnroot/<forge_project>/
|
|
|
cd <forge_project>
|
|
|
git remote add origin git@gitlab.inria.fr:<gitlab_user>/<gitlab_project>.git
|
|
|
git push --set-upstream origin master
|
... | ... | |