##// END OF EJS Templates
Fix behaviour of commit....
Bryan O'Sullivan -
r1319:5a15df63 default
parent child Browse files
Show More
@@ -682,14 +682,19 b' def commit(ui, repo, *pats, **opts):'
682 " please use -m or --message instead.\n")
682 " please use -m or --message instead.\n")
683 message = opts['message'] or opts['text']
683 message = opts['message'] or opts['text']
684 logfile = opts['logfile']
684 logfile = opts['logfile']
685
686 if message and logfile:
687 raise util.Abort('options --message and --logfile are mutually '
688 'exclusive')
685 if not message and logfile:
689 if not message and logfile:
686 try:
690 try:
687 if logfile == '-':
691 if logfile == '-':
688 message = sys.stdin.read()
692 message = sys.stdin.read()
689 else:
693 else:
690 message = open(logfile).read()
694 message = open(logfile).read()
691 except IOError, why:
695 except IOError, inst:
692 ui.warn("Can't read commit message %s: %s\n" % (logfile, why))
696 raise util.Abort("can't read commit message '%s': %s" %
697 (logfile, inst.strerror))
693
698
694 if opts['addremove']:
699 if opts['addremove']:
695 addremove(ui, repo, *pats, **opts)
700 addremove(ui, repo, *pats, **opts)
General Comments 0
You need to be logged in to leave comments. Login now