Version 38 vs 39
Version 38 vs 39
Edits
Edits
- Edit by aubort, Version 39
- May 18 2017 15:14
- ·remove svn2git which is borken
- Edit by • rezzonico, Version 38
- May 2 2017 10:54
« Previous Change | Next Change » |
Edit Older Version 38... | Edit Older Version 39... |
Content Changes
Content Changes
This is the manual migration procedure, there's also a script to automate the migration, see [[c4science/migration-script]]
= Migration from GIT =
1. Add a [[ https://c4science.ch/settings/panel/ssh/ | public ssh key ]] to your account (or a [[ https://c4science.ch/settings/panel/vcspassword/ | VCS password ]])
2. [[ c4science/simplerepo/ | Create repo in c4science ]]
3. Clone a fresh copy of the repository and enter the directory (even if you already have a local copy, this ensure all the remote branches are fetched)
```
cd /tmp # or any directory of your choice
git clone --mirror https://rezzonic@git.epfl.ch/repo/scitas-benchmarks.git
cd scitas-benchmarks.git
```
4. Push everything to c4science, replace <URI> with the new c4science URI, for example `ssh://git@c4science.ch/diffusion/PHTEST/test.git`
```
git push --all <URI>
git push --tags <URI>
```
5. Wait until all the commits are parsed by Phabricator to be available on the web interface
6. You can clone your repository with the new URI
```
git clone <URI>
```
= Migration from SVN =
* You can either migrate from SVN to GIT (preferred), or SVN to SVN
== SVN to GIT ==
You can use the [[ https://github.com/nirvdrum/svn2git | svn2git ]] utility.
== SVN to SVN ==
- [[ c4science/simplerepo/ | Create a subversion repository ]]
- Be sure to have a SSH key configured ([[ https://c4science.ch/settings/panel/ssh/ | public ssh key ]])
- On the management page
- Activate the repository
- Activate "Allow Dangerous Changes"
- In your local computer, checkout the repository on svn.epfl.ch, go in the created directory
- Initialize and syncronize the repository with c4science using your new repository URL (change the <ID> and <NAME> parts)
```
svnsync init svn+ssh://git@c4science.ch/diffusion/<ID>/ https://svn.epfl.ch/svn/<NAME>
svnsync sync svn+ssh://git@c4science.ch/diffusion/<ID>/
```
Remark: c4science URLs in the format `svn+ssh://git@c4science.ch/source/<C4_SHORT_NAME>/` will also do the trick
- Deactivate Dangerous Changes
- You can now checkout the new URL on your machine
```
svn checkout svn+ssh://git@c4science.ch/diffusion/<ID>/ myrepo
```
= Service accounts =
If you are using //service accounts// for your git and svn repositories, you can either use ssh keys on c4science or you can [[ c4science/bot/ | ask for a bot user ]].
This is the manual migration procedure, there's also a script to automate the migration, see [[c4science/migration-script]]
= Migration from GIT =
1. Add a [[ https://c4science.ch/settings/panel/ssh/ | public ssh key ]] to your account (or a [[ https://c4science.ch/settings/panel/vcspassword/ | VCS password ]])
2. [[ c4science/simplerepo/ | Create repo in c4science ]]
3. Clone a fresh copy of the repository and enter the directory (even if you already have a local copy, this ensure all the remote branches are fetched)
```
cd /tmp # or any directory of your choice
git clone --mirror https://rezzonic@git.epfl.ch/repo/scitas-benchmarks.git
cd scitas-benchmarks.git
```
4. Push everything to c4science, replace <URI> with the new c4science URI, for example `ssh://git@c4science.ch/diffusion/PHTEST/test.git`
```
git push --all <URI>
git push --tags <URI>
```
5. Wait until all the commits are parsed by Phabricator to be available on the web interface
6. You can clone your repository with the new URI
```
git clone <URI>
```
= Migration from SVN =
* You can either migrate from SVN to GIT (preferred), or SVN to SVN
== SVN to GIT ==
WARNING: This procedure has been tested in specific case, please know what you're doing
* Have GIT installed
* It depends on how your svn repository is organized,
1) If there are trunk/branches/tags directories:
```
git svn clone https://svn.epfl.ch/svn/<repo name>/ --username <gaspar>
```
2) If your repository starts at the root, you can also replace `/` with a directory in your repo, the final git repository will contain only this directory (you allow to split your SVN repository into multiple GIT repo for instance)
```
git svn clone https://svn.epfl.ch/svn/<repo name>/ --username <gaspar> --trunk /
```
* Create a GIT repo on c4science
* Add the remote to your new git repository
```
cd <repo name>
git remote add origin https://c4science.ch/code/<new repo>
git push origin master
```
== SVN to SVN ==
- [[ c4science/simplerepo/ | Create a subversion repository ]]
- Be sure to have a SSH key configured ([[ https://c4science.ch/settings/panel/ssh/ | public ssh key ]])
- On the management page
- Activate the repository
- Activate "Allow Dangerous Changes"
- In your local computer, checkout the repository on svn.epfl.ch, go in the created directory
- Initialize and syncronize the repository with c4science using your new repository URL (change the <ID> and <NAME> parts)
```
svnsync init svn+ssh://git@c4science.ch/diffusion/<ID>/ https://svn.epfl.ch/svn/<NAME>
svnsync sync svn+ssh://git@c4science.ch/diffusion/<ID>/
```
Remark: c4science URLs in the format `svn+ssh://git@c4science.ch/source/<C4_SHORT_NAME>/` will also do the trick
- Deactivate Dangerous Changes
- You can now checkout the new URL on your machine
```
svn checkout svn+ssh://git@c4science.ch/diffusion/<ID>/ myrepo
```
= Service accounts =
If you are using //service accounts// for your git and svn repositories, you can either use ssh keys on c4science or you can [[ c4science/bot/ | ask for a bot user ]].
This is the manual migration procedure, there's also a script to automate the migration, see [[c4science/migration-script]]
= Migration from GIT =
1. Add a [[ https://c4science.ch/settings/panel/ssh/ | public ssh key ]] to your account (or a [[ https://c4science.ch/settings/panel/vcspassword/ | VCS password ]])
2. [[ c4science/simplerepo/ | Create repo in c4science ]]
3. Clone a fresh copy of the repository and enter the directory (even if you already have a local copy, this ensure all the remote branches are fetched)
```
cd /tmp # or any directory of your choice
git clone --mirror https://rezzonic@git.epfl.ch/repo/scitas-benchmarks.git
cd scitas-benchmarks.git
```
4. Push everything to c4science, replace <URI> with the new c4science URI, for example `ssh://git@c4science.ch/diffusion/PHTEST/test.git`
```
git push --all <URI>
git push --tags <URI>
```
5. Wait until all the commits are parsed by Phabricator to be available on the web interface
6. You can clone your repository with the new URI
```
git clone <URI>
```
= Migration from SVN =
* You can either migrate from SVN to GIT (preferred), or SVN to SVN
== SVN to GIT ==
You can use the [[ https://github.com/nirvdrum/svn2git | svn2git ]] utility.WARNING: This procedure has been tested in specific case, please know what you're doing
* Have GIT installed
* It depends on how your svn repository is organized,
1) If there are trunk/branches/tags directories:
```
git svn clone https://svn.epfl.ch/svn/<repo name>/ --username <gaspar>
```
2) If your repository starts at the root, you can also replace `/` with a directory in your repo, the final git repository will contain only this directory (you allow to split your SVN repository into multiple GIT repo for instance)
```
git svn clone https://svn.epfl.ch/svn/<repo name>/ --username <gaspar> --trunk /
```
* Create a GIT repo on c4science
* Add the remote to your new git repository
```
cd <repo name>
git remote add origin https://c4science.ch/code/<new repo>
git push origin master
```
== SVN to SVN ==
- [[ c4science/simplerepo/ | Create a subversion repository ]]
- Be sure to have a SSH key configured ([[ https://c4science.ch/settings/panel/ssh/ | public ssh key ]])
- On the management page
- Activate the repository
- Activate "Allow Dangerous Changes"
- In your local computer, checkout the repository on svn.epfl.ch, go in the created directory
- Initialize and syncronize the repository with c4science using your new repository URL (change the <ID> and <NAME> parts)
```
svnsync init svn+ssh://git@c4science.ch/diffusion/<ID>/ https://svn.epfl.ch/svn/<NAME>
svnsync sync svn+ssh://git@c4science.ch/diffusion/<ID>/
```
Remark: c4science URLs in the format `svn+ssh://git@c4science.ch/source/<C4_SHORT_NAME>/` will also do the trick
- Deactivate Dangerous Changes
- You can now checkout the new URL on your machine
```
svn checkout svn+ssh://git@c4science.ch/diffusion/<ID>/ myrepo
```
= Service accounts =
If you are using //service accounts// for your git and svn repositories, you can either use ssh keys on c4science or you can [[ c4science/bot/ | ask for a bot user ]].
c4science · Help