Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
f361b1c6
Commit
f361b1c6
authored
Oct 11, 2016
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor the SubGit/SVN documentation
[ci skip]
parent
f60e0b92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
40 deletions
+52
-40
doc/workflow/importing/migrating_from_svn.md
doc/workflow/importing/migrating_from_svn.md
+52
-40
No files found.
doc/workflow/importing/migrating_from_svn.md
View file @
f361b1c6
...
@@ -10,7 +10,7 @@ There are two approaches to SVN to Git migration:
...
@@ -10,7 +10,7 @@ There are two approaches to SVN to Git migration:
1.
[
Git/SVN Mirror
](
#smooth-migration-with-a-gitsvn-mirror-using-subgit
)
which:
1.
[
Git/SVN Mirror
](
#smooth-migration-with-a-gitsvn-mirror-using-subgit
)
which:
-
Makes the GitLab repository to mirror the SVN project.
-
Makes the GitLab repository to mirror the SVN project.
-
Git and SVN repositories are kept in sync; you can use either one.
-
Git and SVN repositories are kept in sync; you can use either one.
-
Smoothens the migration process and allows to manage migration risks.
-
Smoothens the migration process and allows to manage migration risks.
1.
[
Cut over migration
](
#cut-over-migration-with-svn2git
)
which:
1.
[
Cut over migration
](
#cut-over-migration-with-svn2git
)
which:
...
@@ -19,82 +19,94 @@ There are two approaches to SVN to Git migration:
...
@@ -19,82 +19,94 @@ There are two approaches to SVN to Git migration:
## Smooth migration with a Git/SVN mirror using SubGit
## Smooth migration with a Git/SVN mirror using SubGit
#### Prerequisites
[
SubGit
](
https://subgit.com
)
is a tool for a smooth, stress-free SVN to Git
migration. It creates a writable Git mirror of a local or remote Subversion
repository and that way you can use both Subversion and Git as long as you like.
It requires access to your GitLab server as it talks with the Git repositories
directly in a filesystem level.
Install Oracle JRE 1.8 or newer. On Debian-based Linux distributions follow this
### SubGit prerequisites
[
instruction
](
http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
)
.
Download SubGit tool from
[
https://subgit.com/download/
](
https://subgit.com/download/
)
1.
Install Oracle JRE 1.8 or newer. On Debian-based Linux distributions you can
follow
[
this article
](
http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
)
.
1.
Download SubGit from https://subgit.com/download/.
1.
Unpack the downloaded SubGit zip archive to the
`/opt`
directory. The
`subgit`
command will be available at
`/opt/subgit-VERSION/bin/subgit`
.
Unpack downloaded SubGit zip archive to
`/opt`
directory, subgit will be available
### SubGit configuration
at
`/opt/subgit-VERSION/bin/subgit`
#### Configuration
The first step to mirror you SVN repository in GitLab is to create a new empty
project which will be used as a mirror. For Omnibus installations the path to
In GitLab create new empty repository. In filesystem it will be located at
the repository will be located at
`/var/opt/gitlab/git-data/repositories/USER/REPOS.git`
path by default.
`/var/opt/gitlab/git-data/repositories/USER/REPO.git`
by default. For
For convenice, assign this path to a variable:
installations from source, the default repository directory will be
`/home/git/repositories/USER/REPO.git`
. For convenience, assign this path to a
variable:
```
```
GIT_REPO
S
_PATH=/var/opt/gitlab/git-data/repositories/USER/REPOS.git
GIT_REPO_PATH=/var/opt/gitlab/git-data/repositories/USER/REPOS.git
```
```
SubGit will keep this repository
will be kept in sync with a remote SVN project.
SubGit will keep this repository
in sync with a remote SVN project. For
For convenience, assign
remote SVN project URL to a variable:
convenience, assign your
remote SVN project URL to a variable:
```
```
SVN_PROJECT_URL=http://svn.company.com/repos/project
SVN_PROJECT_URL=http://svn.company.com/repos/project
```
```
Run SubGit to set up a Git/SVN mirror. Make sure
`subgit`
command is ran
Next you need to run SubGit to set up a Git/SVN mirror. Make sure the following
on behalf of the same user that keeps ownership of GitLab Git repositories (
`git`
by default):
`subgit`
command is ran on behalf of the same user that keeps ownership of
GitLab Git repositories (by default
`git`
):
```
```
subgit configure --layout auto $SVN_PROJECT_URL $GIT_REPO
S
_PATH
subgit configure --layout auto $SVN_PROJECT_URL $GIT_REPO_PATH
```
```
Adjust authors and branches mappings, if necessary:
Adjust authors and branches mappings, if necessary. Open with your favorite
text editor:
```
```
edit $GIT_REPO
S
_PATH/subgit/authors.txt
edit $GIT_REPO_PATH/subgit/authors.txt
edit $GIT_REPO
S
_PATH/subgit/config
edit $GIT_REPO_PATH/subgit/config
```
```
For more information regarding
SubGit configuration options, refer to
For more information regarding
the SubGit configuration options, refer to
[
documentation
](
https://subgit.com/documentation.html
)
at SubGit web
site.
[
SubGit's documentation
](
https://subgit.com/documentation.html
)
web
site.
###
#
Initial translation
### Initial translation
Run
`subgit`
to perform initial translation of existing SVN revisions into
Now that SubGit has configured the Git/SVN repos, run
`subgit`
to perform the
Git repository:
initial translation of existing SVN revisions into the
Git repository:
```
```
subgit install $GIT_REPOS_PATH
subgit install $GIT_REPOS_PATH
```
```
After
initial translation is completed, GitLab Git repository and SVN project
After
the initial translation is completed, the Git repository and the SVN
will be kept in sync by
`subgit`
- new Git commits will be translated to SVN
project will be kept in sync by
`subgit`
- new Git commits will be translated to
revisions and new SVN revisions will be translated to Git commits. Mirror works
SVN revisions and new SVN revisions will be translated to Git commits. Mirror
transparently and does not require any special commands.
works
transparently and does not require any special commands.
Would you prefer to perform one-time cut over migration with
`subgit`
use
If you would prefer to perform one-time cut over migration with
`subgit`
, use
`import`
command in place
of
`install`
:
the
`import`
command instead
of
`install`
:
```
```
subgit import $GIT_REPO
S
_PATH
subgit import $GIT_REPO_PATH
```
```
###
# L
icensing
###
SubGit l
icensing
Running SubGit in a mirror mode requires
[
registration
](
https://subgit.com/pricing.html
)
. Registration is free for Open Source,
Running SubGit in a mirror mode requires a
Academic and Startup projects.
[
registration
](
https://subgit.com/pricing.html
)
. Registration is free for open
source, academic and startup projects.
We're currently working on deeper GitLab/SubGit inte
rg
ation. You may track our
We're currently working on deeper GitLab/SubGit inte
gr
ation. You may track our
progress at
[
this issue
](
https://gitlab.com/gitlab-org/gitlab-ee/issues/990
)
.
progress at
[
this issue
](
https://gitlab.com/gitlab-org/gitlab-ee/issues/990
)
.
###
# S
upport
###
SubGit s
upport
For any questions related to SVN to GitLab migration with SubGit you can contact SubGit team at
[
support@subgit.com
](
mailto:support@subgit.com
)
.
For any questions related to SVN to GitLab migration with SubGit, you can
contact the SubGit team directly at
[
support@subgit.com
](
mailto:support@subgit.com
)
.
## Cut over migration with svn2git
## Cut over migration with svn2git
...
@@ -168,4 +180,4 @@ git push --tags origin
...
@@ -168,4 +180,4 @@ git push --tags origin
## Contribute to this guide
## Contribute to this guide
We welcome all contributions that would expand this guide with instructions on
We welcome all contributions that would expand this guide with instructions on
how to migrate from SVN and other version control systems.
how to migrate from SVN and other version control systems.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment