Mercurial > hg > mercurial-crew-with-dirclash
changeset 899:aa5b726e9619
Add '-' support to the commit logfile option to read message from stdin.
author | mark.williamson@cl.cam.ac.uk |
---|---|
date | Sun, 14 Aug 2005 12:30:01 -0800 |
parents | 3616c0d7ab88 |
children | ba8cf1f2210c |
files | mercurial/commands.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -522,7 +522,10 @@ def commit(ui, repo, *pats, **opts): logfile = opts['logfile'] if not message and logfile: try: - message = open(logfile).read() + if logfile == '-': + message = sys.stdin.read() + else: + message = open(logfile).read() except IOError, why: ui.warn("Can't read commit message %s: %s\n" % (logfile, why))