def working_copy(remote_url, path=None, branch='master', update=True, use_sudo=False, user=None):
 command()
 if (path is None):
  path = remote_url.split('/')[(-1)]
  if path.endswith('.git'):
   path = path[:(-4)]
 if is_dir(path, use_sudo=use_sudo):
  git.fetch(path=path, use_sudo=use_sudo, user=user)
  git.checkout(path=path, branch=branch, use_sudo=use_sudo, user=user)
  if update:
   git.pull(path=path, use_sudo=use_sudo, user=user)
 elif (not is_dir(path, use_sudo=use_sudo)):
  git.clone(remote_url, path=path, use_sudo=use_sudo, user=user)
  git.checkout(path=path, branch=branch, use_sudo=use_sudo, user=user)
 else:
  raise ValueError('Invalid combination of parameters.')

def working_copy ( remote_url , path = None , branch = 'master' , update = True , use_sudo = False , user = None ) : command ( ) if ( path is None ) : path = remote_url . split ( '/' ) [ ( - 1 ) ] if path . endswith ( '.git' ) : path = path [ : ( - 4 ) ] if is_dir ( path , use_sudo = use_sudo ) : git . fetch ( path = path , use_sudo = use_sudo , user = user ) git . checkout ( path = path , branch = branch , use_sudo = use_sudo , user = user ) if update : git . pull ( path = path , use_sudo = use_sudo , user = user ) elif ( not is_dir ( path , use_sudo = use_sudo ) ) : git . clone ( remote_url , path = path , use_sudo = use_sudo , user = user ) git . checkout ( path = path , branch = branch , use_sudo = use_sudo , user = user ) else : raise ValueError ( 'Invalid combination of parameters.' )
require a working copy of the repository from the remote_url .