def clone_repository(repository_clone_url, repository_file_dir, ctx_rev):
 try:
  commands.clone(get_configured_ui(), str(repository_clone_url), dest=str(repository_file_dir), pull=True, noupdate=False, rev=listify(str(ctx_rev)))
  return (True, None)
 except Exception as e:
  error_message = ('Error cloning repository: %s' % str(e))
  log.debug(error_message)
  return (False, error_message)

def clone_repository ( repository_clone_url , repository_file_dir , ctx_rev ) : try : commands . clone ( get_configured_ui ( ) , str ( repository_clone_url ) , dest = str ( repository_file_dir ) , pull = True , noupdate = False , rev = listify ( str ( ctx_rev ) ) ) return ( True , None ) except Exception as e : error_message = ( 'Error cloning repository: %s' % str ( e ) ) log . debug ( error_message ) return ( False , error_message )
clone the repository up to the specified changeset_revision .