mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Provide more detail when the commit button is not shown.
This commit is contained in:
parent
c38e7d4c4b
commit
2d3b0d725a
2 changed files with 17 additions and 8 deletions
|
@ -49,7 +49,7 @@ entries marked with * were changed within the last 7 days.)
|
||||||
|
|
||||||
# Version -- don't change unless you edit faqwiz.py
|
# Version -- don't change unless you edit faqwiz.py
|
||||||
|
|
||||||
WIZVERSION = "1.0.2" # FAQ Wizard version
|
WIZVERSION = "1.0.3" # FAQ Wizard version
|
||||||
|
|
||||||
# This parameter is normally overwritten with a dynamic value
|
# This parameter is normally overwritten with a dynamic value
|
||||||
|
|
||||||
|
@ -369,9 +369,13 @@ Click this button to commit your changes.
|
||||||
<HR>
|
<HR>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
NOCOMMIT = """
|
NOCOMMIT_HEAD = """
|
||||||
To commit your changes, please enter a log message, your name, email
|
To commit your changes, please correct the following errors in the
|
||||||
addres, and the correct password in the form below.
|
form below and click the Preview Edit button.
|
||||||
|
<UL>
|
||||||
|
"""
|
||||||
|
NOCOMMIT_TAIL = """
|
||||||
|
</UL>
|
||||||
<HR>
|
<HR>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -379,7 +383,7 @@ CANTCOMMIT_HEAD = """
|
||||||
Some required information is missing:
|
Some required information is missing:
|
||||||
<UL>
|
<UL>
|
||||||
"""
|
"""
|
||||||
NEED_PASSWD = "<LI>You must provide the correct passwd.\n"
|
NEED_PASSWD = "<LI>You must provide the correct password.\n"
|
||||||
NEED_AUTHOR = "<LI>You must enter your name.\n"
|
NEED_AUTHOR = "<LI>You must enter your name.\n"
|
||||||
NEED_EMAIL = "<LI>You must enter your email address.\n"
|
NEED_EMAIL = "<LI>You must enter your email address.\n"
|
||||||
NEED_LOG = "<LI>You must enter a log message.\n"
|
NEED_LOG = "<LI>You must enter a log message.\n"
|
||||||
|
|
|
@ -743,14 +743,20 @@ class FaqWizard:
|
||||||
if commit_ok:
|
if commit_ok:
|
||||||
emit(COMMIT)
|
emit(COMMIT)
|
||||||
else:
|
else:
|
||||||
emit(NOCOMMIT)
|
emit(NOCOMMIT_HEAD)
|
||||||
|
self.errordetail()
|
||||||
|
emit(NOCOMMIT_TAIL)
|
||||||
emit(EDITFORM2, self.ui, entry, load_my_cookie())
|
emit(EDITFORM2, self.ui, entry, load_my_cookie())
|
||||||
emit(EDITFORM3)
|
emit(EDITFORM3)
|
||||||
|
|
||||||
def cantcommit(self):
|
def cantcommit(self):
|
||||||
self.prologue(T_CANTCOMMIT)
|
self.prologue(T_CANTCOMMIT)
|
||||||
print CANTCOMMIT_HEAD
|
print CANTCOMMIT_HEAD
|
||||||
if not self.ui.passwd:
|
self.errordetail()
|
||||||
|
print CANTCOMMIT_TAIL
|
||||||
|
|
||||||
|
def errordetail(self):
|
||||||
|
if PASSWORD and self.ui.password != PASSWORD:
|
||||||
emit(NEED_PASSWD)
|
emit(NEED_PASSWD)
|
||||||
if not self.ui.log:
|
if not self.ui.log:
|
||||||
emit(NEED_LOG)
|
emit(NEED_LOG)
|
||||||
|
@ -758,7 +764,6 @@ class FaqWizard:
|
||||||
emit(NEED_AUTHOR)
|
emit(NEED_AUTHOR)
|
||||||
if not self.ui.email:
|
if not self.ui.email:
|
||||||
emit(NEED_EMAIL)
|
emit(NEED_EMAIL)
|
||||||
print CANTCOMMIT_TAIL
|
|
||||||
|
|
||||||
def commit(self, entry):
|
def commit(self, entry):
|
||||||
file = entry.file
|
file = entry.file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue