diff --git a/gestion/darcs_send_changes.py b/gestion/darcs_send_changes.py index a003db0a..ca0e08b4 100755 --- a/gestion/darcs_send_changes.py +++ b/gestion/darcs_send_changes.py @@ -189,6 +189,12 @@ if __name__ == "__main__": if repo: os.chdir(repo) + else: + while not os.path.exists('_darcs') and os.getcwd() != '/': + os.chdir('..') + if not os.path.exists('_darcs') and os.getcwd() == '/': + cprint("Pas de dépôt darcs trouvé") + sys.exit(1) if not template and os.path.exists(TEMPLATE_FILE): template = TEMPLATE_FILE if template: