review/messages.py @ 22de90ef33ed

Add identifiers to ReviewChangeset's and ReviewSignoff's.

The identifier of a rcset/rsignoff is the filename it was saved as, which is
the hash of its contents.

This will be useful when we want to add replies to comments/signoffs.

CLI support for this feature has also been added (using --verbose and --debug
flags with 'hg review [-r REV]'), as well as some simple unit tests.
author Steve Losh <steve@stevelosh.com>
date Sat, 27 Mar 2010 11:10:12 -0400
parents e627607e24d0
children a55ffc78928c
"""Messages used by the command-line UI of hg-review.

These are kept in a separate module to avoid repeating them over and over
in the extension_ui module, and to make checking for proper output in the
unit tests much easier.

"""

INIT_START = """\
initializing the code review data store and config
"""

INIT_SUCCESS_UNCOMMITTED = """\
the review data has been initialized
run "hg commit .hgreview -m 'initialize code review'" to record it permanently
"""

INIT_SUCCESS_CLONED = """\
the review data has been initialized
"""

INIT_REQUIRES_REMOTE_PATH ="""\
you must provide a remote path (see 'hg help review-init')!
"""

INIT_EXISTS = """\
the review data has already been initialized!
"""

INIT_EXISTS_UNCOMMITTED = """\
the review data has already been initialized, but is not recorded!
run "hg commit .hgreview -m 'initialize code review'" to record it permanently
"""

INIT_UNSUPPORTED_RELATIVE_RPATH = """\
relative remote paths are not supported (yet)!
"""

COMMENT_REQUIRES_MESSAGE = """\
a message must be provided to add a comment!
"""

COMMENT_FILE_DOES_NOT_EXIST = """\
file %s was not changed in revision %s!
"""

COMMENT_LINES_REQUIRE_FILE = """\
you must give a filename to comment on specific lines!
"""

SIGNOFF_REQUIRES_MESSAGE = """\
a message must be provided to sign off!
"""

SIGNOFF_OPINION_CONFLICT = """\
cannot sign off as both --yes and --no!
"""

SIGNOFF_EXISTS = """\
you have already signed off on this changeset (use --force to overwrite)!
"""

REVIEW_LOG_CSET = """\
changeset: %d:%s
"""

REVIEW_LOG_AUTHOR = """\
author:    %s
"""

REVIEW_LOG_SUMMARY = """\
summary:   %s

"""

REVIEW_LOG_SIGNOFFS = """\
signoffs:  %d signoffs (%d yes, %d no, %d neutral)
"""

REVIEW_LOG_COMMENTS = """\
comments:  %d comments from %d authors
"""

REVIEW_LOG_COMMENT_AUTHOR = """# %s said:"""

REVIEW_LOG_COMMENT_LINE = """\
#     %s
"""

REVIEW_LOG_SIGNOFF_AUTHOR = """$ %s signed off as %s, saying:"""

REVIEW_LOG_SIGNOFF_LINE = """\
$     %s
"""

REVIEW_LOG_AGE = """(%s)"""
REVIEW_LOG_IDENTIFIER = """ (%s)"""
REVIEW_LOG_FILE_HEADER = """changes in %s"""

REVIEW_LOG_SKIPPED = """\
... skipped %d lines ...
"""

COMMIT_COMMENT = """Add a comment on changeset %s"""
COMMIT_SIGNOFF = """Sign off on changeset %s"""
DELETE_SIGNOFF = """Remove sign off on changeset %s"""

WEB_START = """\
starting CherryPy web server
"""