Exemple #1
0
 def parse_uri(raw_uri):
     if not raw_uri.startswith("git+") and not raw_uri.startswith("git://"):
         raise base.uri_exception(raw_uri,
                                  "doesn't start with git+ nor git://")
     if raw_uri.startswith("git+"):
         if raw_uri.startswith("git+:"):
             raise base.uri_exception(
                 raw_uri, "need to specify the sub protocol if using git+")
         return raw_uri[4:]
     return raw_uri
Exemple #2
0
 def parse_uri(raw_uri):
     if not raw_uri.startswith("git+") and not raw_uri.startswith("git://"):
         raise base.uri_exception(
             raw_uri, "doesn't start with git+ nor git://")
     if raw_uri.startswith("git+"):
         if raw_uri.startswith("git+:"):
             raise base.uri_exception(
                 raw_uri, "need to specify the sub protocol if using git+")
         return raw_uri[4:]
     return raw_uri
Exemple #3
0
 def parse_uri(raw_uri):
     if raw_uri.startswith("svn://"):
         return True
     elif raw_uri.startswith("http+svn://"):
         return True
     elif raw_uri.startswith("https+svn://"):
         return True
     elif raw_uri.startswith("svn+"):
         if raw_uri.startswith("svn+:"):
             raise base.uri_exception(raw_uri, "svn+:// isn't valid")
     else:
         raise base.uri_exception(raw_uri, "protocol unknown")
     return True
Exemple #4
0
 def parse_uri(raw_uri):
     if raw_uri.startswith("svn://"):
         return True
     elif raw_uri.startswith("http+svn://"):
         return True
     elif raw_uri.startswith("https+svn://"):
         return True
     elif raw_uri.startswith("svn+"):
         if raw_uri.startswith("svn+:"):
             raise base.uri_exception(raw_uri, "svn+:// isn't valid")
     else:
         raise base.uri_exception(raw_uri, "protocol unknown")
     return True
Exemple #5
0
 def parse_uri(cls, raw_uri):
     if not raw_uri.startswith("cvs") and \
             not raw_uri.startswith("cvs+"):
         raise base.uri_exception(raw_uri, "must be cvs:// or cvs+${RSH}")
     if raw_uri.startswith("cvs://"):
         return None, raw_uri[len("cvs://"):]
     proto = raw_uri[len("cvs+"):].split(":", 1)
     if not proto[0]:
         raise base.uri_exception(
             raw_uri, "cvs+ requires the rsh alternative to be specified")
     if proto[0] == "anon":
         proto[0] = None
     elif proto[0] != "pserver":
         proto[0] = cls.require_binary(proto[0])
     return proto[0], proto[1].lstrip("/")
Exemple #6
0
 def parse_uri(raw_uri):
     if raw_uri.startswith("hg+"):
         return raw_uri[3:]
     elif raw_uri.startswith("mercurial+"):
         return raw_uri[len("mercurial+"):]
     raise base.uri_exception(raw_uri, "doesn't start with hg+"
         " nor mercurial+")
Exemple #7
0
    def parse_uri(cls, raw_uri):
        if not raw_uri.startswith("rsync://") and \
                not raw_uri.startswith("rsync+"):
            raise base.uri_exception(raw_uri, "doesn't start with rsync:// nor rsync+")

        if raw_uri.startswith("rsync://"):
            return None, raw_uri

        proto = raw_uri.split(":", 1)
        proto[0] = proto[0].split("+", 1)[1]
        cls.require_binary(proto[0])
        return proto[0], "rsync:%s" % proto[1]
Exemple #8
0
    def parse_uri(cls, raw_uri):
        if not raw_uri.startswith("rsync://") and \
            not raw_uri.startswith("rsync+"):
            raise base.uri_exception(raw_uri, "doesn't start with rsync:// nor rsync+")

        if raw_uri.startswith("rsync://"):
            return None, raw_uri

        proto = raw_uri.split(":", 1)
        proto[0] = proto[0].split("+", 1)[1]
        cls.require_binary(proto[0])
        return proto[0], "rsync:%s" % proto[1]
Exemple #9
0
 def parse_uri(raw_uri):
     if not raw_uri.startswith("darcs+"):
         raise base.uri_exception(raw_uri, "doesn't start with darcs+")
     return raw_uri[6:]
Exemple #10
0
 def parse_uri(raw_uri):
     if not raw_uri.startswith("bzr+"):
         raise base.uri_exception(raw_uri, "doesn't start with bzr+")
     return raw_uri[4:]