mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-18 05:22:10 +01:00
Merge pull request #1275 from scm-manager/feature/import_documentation
adds documentation for importing existing repositories
This commit is contained in:
@@ -40,3 +40,7 @@ After changing the configuration, SCM-Manager must be restarted.
|
||||
### How do I install plugins?
|
||||
|
||||
Find the plugin you like to install at [plugins](/plugins#categories) and follow the installation instructions on the install page of the plugin.
|
||||
|
||||
### How can I import my existing (git|mercurial|subversion) repository
|
||||
|
||||
Please have a look on [these](../import/) detailed instructions.
|
||||
|
||||
55
docs/en/import.md
Normal file
55
docs/en/import.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Import existing repositories
|
||||
subtitle: How to import existing repositories into SCM-Manager
|
||||
displayToc: true
|
||||
---
|
||||
|
||||
## Git
|
||||
|
||||
First you have to clone the old repository with the `mirror` option.
|
||||
This option ensures that all branches and tags are fetched from the remote repository.
|
||||
Assuming that your remote repository is accessible under the url `https://hgttg.com/r/git/heart-of-gold`, the clone command should look like this:
|
||||
|
||||
```bash
|
||||
git clone --mirror https://hgttg.com/r/git/heart-of-gold
|
||||
```
|
||||
|
||||
Than you have to create your new repository via the SCM-Manager web interface and copy the url.
|
||||
In this example we assume that the new repository is available at `https://hitchhiker.com/scm/repo/hgttg/heart-of-gold`. After the new repository is created, we can configure our local repository for the new location and push all refs.
|
||||
|
||||
```bash
|
||||
cd heart-of-gold
|
||||
git remote set-url origin https://hitchhiker.com/scm/repo/hgttg/heart-of-gold
|
||||
git push --mirror
|
||||
```
|
||||
|
||||
## Mercurial
|
||||
|
||||
To import an existing mercurial repository, we have to create a new repository over the SCM-Manager web interface, clone it, pull from the old repository and push to the new repository.
|
||||
In this example we assume that the old repository is `https://hgttg.com/r/hg/heart-of-gold` and the newly created is located at `https://hitchhiker.com/scm/repo/hgttg/heart-of-gold`:
|
||||
|
||||
```bash
|
||||
hg clone https://hitchhiker.com/scm/repo/hgttg/heart-of-gold
|
||||
cd heart-of-gold
|
||||
hg pull https://hgttg.com/r/hg/heart-of-gold
|
||||
hg push
|
||||
```
|
||||
|
||||
## Subversion
|
||||
|
||||
Subversion is not as easy as mercurial or git.
|
||||
For subversion we have to locate the old repository on the filesystem and create a dump with the `svnadmin` tool.
|
||||
|
||||
```bash
|
||||
svnadmin dump /path/to/repo > oldrepo.dump
|
||||
```
|
||||
|
||||
Now we have to create a new repository via the SCM-Manager web interface.
|
||||
After the repository is created, we have to find its location on the filesystem.
|
||||
This could be done by finding the directory with the newest timestamp in your scm home directory under `repositories`.
|
||||
You can check whether you have found the correct directory by having a look at the file `metadata.xml`. Here you should find the namespace and the name of the repository created.
|
||||
Now its time to import the dump from the old repository:
|
||||
|
||||
```bash
|
||||
svnadmin load /path/to/scm-home/repositories/id/data < oldrepo.dump
|
||||
```
|
||||
@@ -2,6 +2,7 @@
|
||||
entries:
|
||||
- /installation/
|
||||
- /migrate-scm-manager-from-v1/
|
||||
- /import/
|
||||
- /faq/
|
||||
- /known-issues/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user