chris@241: #!/bin/sh chris@241: chris@241: project="$1" chris@241: local_repo="$2" chris@241: remote_repo="$3" chris@241: chris@241: if [ -z "$project" ] || [ -z "$local_repo" ] || [ -z "$remote_repo" ]; then chris@241: echo "Usage: $0 " chris@241: exit 2 chris@241: fi chris@241: chris@241: chris@241: # We need to handle different source repository types separately. chris@241: # chris@241: # The convert extension cannot convert directly from a remote git chris@241: # repo; we'd have to mirror to a local repo first. Incremental chris@241: # conversions do work though. The hg-git plugin will convert chris@241: # directly from remote repositories, but not via all schemes chris@241: # (e.g. https is not currently supported). It's probably easier to chris@241: # use git itself to clone locally and then convert or hg-git from chris@241: # there. chris@241: # chris@241: # We can of course convert directly from remote Subversion repos, chris@241: # but we need to keep track of that -- you can ask to convert into a chris@241: # repo that has already been used (for Mercurial) and it'll do so chris@241: # happily; we don't want that. chris@241: # chris@241: # Converting from a remote Hg repo should be fine! chris@241: # chris@241: # One other thing -- we can't actually tell the difference between chris@241: # the various SCM types based on URL alone. We have to try them chris@241: # (ideally in an order determined by a guess based on the URL) and chris@241: # see what happens. chris@241: chris@241: chris@241: chris@241: