Show More
@@ -36,6 +36,13 b' from mercurial import (' | |||||
36 | cmdtable = {} |
|
36 | cmdtable = {} | |
37 | command = registrar.command(cmdtable) |
|
37 | command = registrar.command(cmdtable) | |
38 |
|
38 | |||
|
39 | configtable = {} | |||
|
40 | configitem = registrar.configitem(configtable) | |||
|
41 | ||||
|
42 | configitem('experimental', 'uncommitondirtywdir', | |||
|
43 | default=False, | |||
|
44 | ) | |||
|
45 | ||||
39 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
|
46 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | |
40 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
47 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |
41 | # be specifying the version(s) of Mercurial they are tested with, or |
|
48 | # be specifying the version(s) of Mercurial they are tested with, or | |
@@ -150,7 +157,7 b' def uncommit(ui, repo, *pats, **opts):' | |||||
150 | wctx = repo[None] |
|
157 | wctx = repo[None] | |
151 |
|
158 | |||
152 | if not pats and not repo.ui.configbool('experimental', |
|
159 | if not pats and not repo.ui.configbool('experimental', | |
153 |
'uncommitondirtywdir' |
|
160 | 'uncommitondirtywdir'): | |
154 | cmdutil.bailifchanged(repo) |
|
161 | cmdutil.bailifchanged(repo) | |
155 | if wctx.parents()[0].node() == node.nullid: |
|
162 | if wctx.parents()[0].node() == node.nullid: | |
156 | raise error.Abort(_("cannot uncommit null changeset")) |
|
163 | raise error.Abort(_("cannot uncommit null changeset")) |
General Comments 0
You need to be logged in to leave comments.
Login now