Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 10402:d216fa04e48a
mq: make init -Q do what qinit -c did
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 08 Feb 2010 10:50:00 +0100 |
parents | 6252852b4332 |
children | 5ddde896a19d |
comparison
equal
deleted
inserted
replaced
10401:6252852b4332 | 10402:d216fa04e48a |
---|---|
59 | 59 |
60 if choice: | 60 if choice: |
61 return choice.values()[0] | 61 return choice.values()[0] |
62 | 62 |
63 raise error.UnknownCommand(cmd) | 63 raise error.UnknownCommand(cmd) |
64 | |
65 def findrepo(p): | |
66 while not os.path.isdir(os.path.join(p, ".hg")): | |
67 oldp, p = p, os.path.dirname(p) | |
68 if p == oldp: | |
69 return None | |
70 | |
71 return p | |
64 | 72 |
65 def bail_if_changed(repo): | 73 def bail_if_changed(repo): |
66 if repo.dirstate.parents()[1] != nullid: | 74 if repo.dirstate.parents()[1] != nullid: |
67 raise util.Abort(_('outstanding uncommitted merge')) | 75 raise util.Abort(_('outstanding uncommitted merge')) |
68 modified, added, removed, deleted = repo.status()[:4] | 76 modified, added, removed, deleted = repo.status()[:4] |