Mercurial > hg > soundsoftware-site
annotate extra/soundsoftware/update-external-repo.sh @ 241:7658d21a1493 feature_73
A bit more work on external repo conversion script
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 22 Feb 2011 17:49:00 +0000 |
parents | |
children | bde4f47b6427 |
rev | line source |
---|---|
chris@241 | 1 #!/bin/sh |
chris@241 | 2 |
chris@241 | 3 project="$1" |
chris@241 | 4 local_repo="$2" |
chris@241 | 5 remote_repo="$3" |
chris@241 | 6 |
chris@241 | 7 if [ -z "$project" ] || [ -z "$local_repo" ] || [ -z "$remote_repo" ]; then |
chris@241 | 8 echo "Usage: $0 <project> <local-repo-path> <remote-repo-url>" |
chris@241 | 9 exit 2 |
chris@241 | 10 fi |
chris@241 | 11 |
chris@241 | 12 |
chris@241 | 13 # We need to handle different source repository types separately. |
chris@241 | 14 # |
chris@241 | 15 # The convert extension cannot convert directly from a remote git |
chris@241 | 16 # repo; we'd have to mirror to a local repo first. Incremental |
chris@241 | 17 # conversions do work though. The hg-git plugin will convert |
chris@241 | 18 # directly from remote repositories, but not via all schemes |
chris@241 | 19 # (e.g. https is not currently supported). It's probably easier to |
chris@241 | 20 # use git itself to clone locally and then convert or hg-git from |
chris@241 | 21 # there. |
chris@241 | 22 # |
chris@241 | 23 # We can of course convert directly from remote Subversion repos, |
chris@241 | 24 # but we need to keep track of that -- you can ask to convert into a |
chris@241 | 25 # repo that has already been used (for Mercurial) and it'll do so |
chris@241 | 26 # happily; we don't want that. |
chris@241 | 27 # |
chris@241 | 28 # Converting from a remote Hg repo should be fine! |
chris@241 | 29 # |
chris@241 | 30 # One other thing -- we can't actually tell the difference between |
chris@241 | 31 # the various SCM types based on URL alone. We have to try them |
chris@241 | 32 # (ideally in an order determined by a guess based on the URL) and |
chris@241 | 33 # see what happens. |
chris@241 | 34 |
chris@241 | 35 |
chris@241 | 36 |
chris@241 | 37 |