sandbox/git.py
def pull(alias: str, url: str) -> int:
    """Execute a 'git pull <url> master' in the repository of the given alias inside
    EXTERNAL_LIBRARIES_ROOT returning the command's status code."""
    cwd = os.getcwd()
    try:
        os.chdir(os.path.join(settings.EXTERNAL_LIBRARIES_ROOT, alias))
        cmd = f"GIT_TERMINAL_PROMPT=0 git pull {url} master"
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
        out, err = p.communicate()
        if p.returncode:
            logger.error(f"Could not pull the external lib '{url}' with alias '{alias}'\n"
                         f"stdout: {out.decode()}\nstderr: {err.decode()}")
        return p.returncode
    finally:
        os.chdir(cwd)
Execute a 'git pull <url> master' in the repository of the given alias inside
    EXTERNAL_LIBRARIES_ROOT returning the command's status code.
Execute a 'git pull  master' in the repository of the given alias inside
EXTERNAL_LIBRARIES_ROOT returning the command's status code.
Execute a ' git pull master ' in the repository of the given alias inside EXTERNAL_LIBRARIES_ROOT returning the command ' s status code .
def pull(alias: str, url: str) -> int:
    cwd = os.getcwd()
    try:
        os.chdir(os.path.join(settings.EXTERNAL_LIBRARIES_ROOT, alias))
        cmd = f"GIT_TERMINAL_PROMPT=0 git pull {url} master"
        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
        out, err = p.communicate()
        if p.returncode:
            logger.error(f"Could not pull the external lib '{url}' with alias '{alias}'\n"
                         f"stdout: {out.decode()}\nstderr: {err.decode()}")
        return p.returncode
    finally:
        os.chdir(cwd)
def pull ( alias : str , url : str ) -> int : cwd = os . getcwd ( ) try : os . chdir ( os . path . join ( settings . EXTERNAL_LIBRARIES_ROOT , alias ) ) cmd = f"GIT_TERMINAL_PROMPT=0 git pull {url} master" p = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = True ) out , err = p . communicate ( ) if p . returncode : logger . error ( f"Could not pull the external lib '{url}' with alias '{alias}'\n" f"stdout: {out.decode()}\nstderr: {err.decode()}" ) return p . returncode finally : os . chdir ( cwd )
Execute a 'git pull <url> master' in the repository of the given alias inside
EXTERNAL_LIBRARIES_ROOT returning the command's status code.
Execute a ' git pull <url > master ' in the repository of the given alias inside EXTERNAL_LIBRARIES_ROOT returning the command ' s status code .
"""Execute a 'git pull <url> master' in the repository of the given alias inside
    EXTERNAL_LIBRARIES_ROOT returning the command's status code."""
alias
str
url
str