Skip to content

Instantly share code, notes, and snippets.

@andyrooster
Forked from leftclickben/gist:322b7a3042cbe97ed2af
Last active January 27, 2018 20:23
Show Gist options
  • Save andyrooster/a2d8ccff375f6897c83a to your computer and use it in GitHub Desktop.
Save andyrooster/a2d8ccff375f6897c83a to your computer and use it in GitHub Desktop.

Revisions

  1. andyrooster renamed this gist Jan 27, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. andyrooster revised this gist Jan 27, 2018. No changes.
  3. @leftclickben leftclickben revised this gist Sep 14, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,6 @@
    ## Commands

    ````bash
    vi users.txt
    git svn clone --stdlayout --no-metadata -A users.txt http://svn.domain.com.au/svn/repository/favourite-project
    cd favourite-project
    git remote add gitlab [email protected]:dev-team/favourite-project.git
  4. @leftclickben leftclickben revised this gist Sep 14, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ git remote add gitlab [email protected]:dev-team/favourite-project.git
    git push --set-upstream gitlab master
    ````

    That's it! Reload the list of projects in GitLab web UI and you will see `favourite-project` listed now, with all commits and files.
    That's it! Reload the project page in GitLab web UI and you will see all commits and files now listed.


    ## Notes
  5. @leftclickben leftclickben revised this gist Sep 14, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@

    ## Commands

    ````
    ````bash
    vi users.txt
    git svn clone --stdlayout --no-metadata -A users.txt http://svn.domain.com.au/svn/repository/favourite-project
    cd favourite-project
  6. @leftclickben leftclickben revised this gist Sep 13, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@
    * A group is created with the namespace `dev-team`.
    * At least one user account is created, added to the group, and has an SSH key for the account being used for the migration (test using `ssh [email protected]`).
    * The project `favourite-project` is created in the `dev-team` namespace.
    * The file `users.txt` contains the relevant user details, one user per line, of the form `username = First Last <[email protected]>`, where `username` is the username given in SVN logs.
    * The file `users.txt` contains the relevant user details, one user per line, of the form `username = First Last <[email protected]>`, where `username` is the username given in SVN logs. (See first link in References section for details, in particular answer by user Casey).


    ## Versions
    @@ -48,3 +48,4 @@ That's it! Reload the list of projects in GitLab web UI and you will see `favou
    * http://stackoverflow.com/questions/79165/migrate-svn-repository-with-history-to-a-new-git-repository/3972103
    * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/import.md (this method didn't work for me)
    * https://github.com/gitlabhq/gitlabhq/issues/4137 (describes why the above didn't work)
    * https://github.com/gitlabhq/gitlab-shell/issues/32
  7. @leftclickben leftclickben revised this gist Sep 13, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,9 @@
    * SVN is hosted at `svn.domain.com.au`.
    * SVN is accessible via `http` (other protocols should work).
    * GitLab is hosted at `git.domain.com.au` and:
    ** A group is created with the namespace `dev-team`.
    ** At least one user account is created, added to the group, and has an SSH key for the account being used for the migration (test using `ssh [email protected]`).
    ** The project `favourite-project` is created in the `dev-team` namespace.
    * A group is created with the namespace `dev-team`.
    * At least one user account is created, added to the group, and has an SSH key for the account being used for the migration (test using `ssh [email protected]`).
    * The project `favourite-project` is created in the `dev-team` namespace.
    * The file `users.txt` contains the relevant user details, one user per line, of the form `username = First Last <[email protected]>`, where `username` is the username given in SVN logs.


  8. @leftclickben leftclickben revised this gist Sep 13, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -7,10 +7,10 @@

    * SVN is hosted at `svn.domain.com.au`.
    * SVN is accessible via `http` (other protocols should work).
    * GitLab is hosted at `git.domain.com.au`.
    * A group is created with the namespace `dev-team`.
    * At least one user account is created, added to the group, and has an SSH key for the account being used for the migration (test using `ssh [email protected]`).
    * The project `favourite-project` is created in the `dev-team` namespace.
    * GitLab is hosted at `git.domain.com.au` and:
    ** A group is created with the namespace `dev-team`.
    ** At least one user account is created, added to the group, and has an SSH key for the account being used for the migration (test using `ssh [email protected]`).
    ** The project `favourite-project` is created in the `dev-team` namespace.
    * The file `users.txt` contains the relevant user details, one user per line, of the form `username = First Last <[email protected]>`, where `username` is the username given in SVN logs.


  9. @leftclickben leftclickben revised this gist Sep 13, 2014. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    # Steps to migrate from SVN to GitLab

    > This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

    ## Setup

    * SVN is hosted at `svn.domain.com.au`.
    @@ -11,6 +14,14 @@
    * The file `users.txt` contains the relevant user details, one user per line, of the form `username = First Last <[email protected]>`, where `username` is the username given in SVN logs.


    ## Versions

    * subversion version 1.6.17 (r1128011)
    * git version 1.9.1
    * GitLab version 7.2.1 ff1633f
    * Ubuntu server 14.04


    ## Commands

    ````
  10. @leftclickben leftclickben revised this gist Sep 13, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -27,6 +27,9 @@ That's it! Reload the list of projects in GitLab web UI and you will see `favou
    ## Notes

    * If there are unknown users, the `git svn clone` command will stop, in which case, update `users.txt`, `cd favourite-project` and `git svn fetch` will continue from where it stopped.
    * The standard `trunk`-`tags`-`branches` layout for SVN repository is required.
    * The SVN URL given to the `git svn clone` command stops at the level immediately above `trunk/`, `tags/` and `branches/`.
    * The `git svn clone` command produces a lot of output, including some warnings at the top; I ignored the warnings.


    ## References
  11. @leftclickben leftclickben created this gist Sep 13, 2014.
    36 changes: 36 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    # Steps to migrate from SVN to GitLab

    ## Setup

    * SVN is hosted at `svn.domain.com.au`.
    * SVN is accessible via `http` (other protocols should work).
    * GitLab is hosted at `git.domain.com.au`.
    * A group is created with the namespace `dev-team`.
    * At least one user account is created, added to the group, and has an SSH key for the account being used for the migration (test using `ssh [email protected]`).
    * The project `favourite-project` is created in the `dev-team` namespace.
    * The file `users.txt` contains the relevant user details, one user per line, of the form `username = First Last <[email protected]>`, where `username` is the username given in SVN logs.


    ## Commands

    ````
    vi users.txt
    git svn clone --stdlayout --no-metadata -A users.txt http://svn.domain.com.au/svn/repository/favourite-project
    cd favourite-project
    git remote add gitlab [email protected]:dev-team/favourite-project.git
    git push --set-upstream gitlab master
    ````

    That's it! Reload the list of projects in GitLab web UI and you will see `favourite-project` listed now, with all commits and files.


    ## Notes

    * If there are unknown users, the `git svn clone` command will stop, in which case, update `users.txt`, `cd favourite-project` and `git svn fetch` will continue from where it stopped.


    ## References

    * http://stackoverflow.com/questions/79165/migrate-svn-repository-with-history-to-a-new-git-repository/3972103
    * https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/import.md (this method didn't work for me)
    * https://github.com/gitlabhq/gitlabhq/issues/4137 (describes why the above didn't work)