Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 3079:4c9fcb5e3b82
If local repository is missing, make error message clearer.
Faheem Mitha suggested finding a better error message.
The nice error message is taken from cogito.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 11 Sep 2006 10:08:30 +0200 |
parents | bc3fe3b5b785 |
children | 81da3c45aabd |
comparison
equal
deleted
inserted
replaced
3078:baa3873eb387 | 3079:4c9fcb5e3b82 |
---|---|
25 p = os.getcwd() | 25 p = os.getcwd() |
26 while not os.path.isdir(os.path.join(p, ".hg")): | 26 while not os.path.isdir(os.path.join(p, ".hg")): |
27 oldp = p | 27 oldp = p |
28 p = os.path.dirname(p) | 28 p = os.path.dirname(p) |
29 if p == oldp: | 29 if p == oldp: |
30 raise repo.RepoError(_("no repo found")) | 30 raise repo.RepoError(_("There is no Mercurial repository" |
31 " here (.hg not found)")) | |
31 path = p | 32 path = p |
32 self.path = os.path.join(path, ".hg") | 33 self.path = os.path.join(path, ".hg") |
33 | 34 |
34 if not os.path.isdir(self.path): | 35 if not os.path.isdir(self.path): |
35 if create: | 36 if create: |