On devine l'emplacement du dépôt.

darcs-hash:20071209165750-af139-02b01e2ea60cb6fc1828843e5989f9a7aad2338f.gz
This commit is contained in:
Jeremie Dimino 2007-12-09 17:57:50 +01:00
parent 5b445c1a89
commit 6b350dca80

View file

@ -189,6 +189,12 @@ if __name__ == "__main__":
if repo: if repo:
os.chdir(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): if not template and os.path.exists(TEMPLATE_FILE):
template = TEMPLATE_FILE template = TEMPLATE_FILE
if template: if template: