Example #1
0
 def gitClone(self, repo, branch):
     appObj = AppConfig()
     try:
         repo_url = appObj.getRepoUrl(repo)
     except (ValueError) as e:
         print("The folowing error occurred.(Error: %s).\n" % e,
               file=sys.stderr)
     exit_code = os.system("git clone --branch {} {}".format(
         branch, repo_url))
     return exit_code
Example #2
0
 def gitClone(self, repo, branch):
     appObj = AppConfig()
     try:
         repo_url = appObj.getRepoUrl(repo)
     except (ValueError) as e:
         print("The folowing error occurred.(Error: %s).\n" %
               e, file=sys.stderr)
     exit_code = os.system(
         "git clone --branch {} {}".format(branch, repo_url))
     return exit_code
Example #3
0
 def gitShallowClone(self, repo, branch, verbose):
     appObj = AppConfig()
     try:
         repo_url = appObj.getRepoUrl(repo)
     except (ValueError) as e:
         print("The folowing error occurred.(Error: %s).\n" % e,
               file=sys.stderr)
     redirect = " >/dev/null 2>&1"
     if verbose:
         redirect = ""
     exit_code = os.system("git clone --depth 1 --branch {} {} {}".format(
         branch, repo_url, redirect))
     return exit_code
Example #4
0
 def gitShallowClone(self, repo, branch, verbose):
     appObj = AppConfig()
     try:
         repo_url = appObj.getRepoUrl(repo)
     except (ValueError) as e:
         print("The folowing error occurred.(Error: %s).\n" %
               e, file=sys.stderr)
     redirect = " >/dev/null 2>&1"
     if verbose:
         redirect = ""
     exit_code = os.system(
         "git clone --depth 1 --branch {} {} {}".format(branch, repo_url, redirect))
     return exit_code