##// END OF EJS Templates
hg commit: add -t and -l options...
mpm@selenic.com -
r289:266396e3 default
parent child Browse files
Show More
@@ -165,9 +165,14 b' def cat(ui, repo, file, rev = []):'
165 if rev: n = r.lookup(rev)
165 if rev: n = r.lookup(rev)
166 sys.stdout.write(r.read(n))
166 sys.stdout.write(r.read(n))
167
167
168 def commit(ui, repo, *files):
168 def commit(ui, repo, *files, **opts):
169 """commit the specified files or all outstanding changes"""
169 """commit the specified files or all outstanding changes"""
170 repo.commit(relpath(repo, files))
170 text = opts['text']
171 if not text and opts['logfile']:
172 try: text = open(opts['logfile']).read()
173 except IOError: pass
174
175 repo.commit(relpath(repo, files), text)
171
176
172 def debugaddchangegroup(ui, repo):
177 def debugaddchangegroup(ui, repo):
173 data = sys.stdin.read()
178 data = sys.stdin.read()
@@ -481,7 +486,10 b' table = {'
481 'hg annotate [-u] [-c] [-n] [-r id] [files]'),
486 'hg annotate [-u] [-c] [-n] [-r id] [files]'),
482 "branch|clone": (branch, [], 'hg branch [path]'),
487 "branch|clone": (branch, [], 'hg branch [path]'),
483 "cat|dump": (cat, [], 'hg cat <file> [rev]'),
488 "cat|dump": (cat, [], 'hg cat <file> [rev]'),
484 "commit|ci": (commit, [], 'hg commit [files]'),
489 "commit|ci": (commit,
490 [('t', 'text', "", 'commit text'),
491 ('l', 'logfile', "", 'commit text file')],
492 'hg commit [files]'),
485 "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'),
493 "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'),
486 "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'),
494 "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'),
487 "debugindex": (debugindex, [], 'debugindex <file>'),
495 "debugindex": (debugindex, [], 'debugindex <file>'),
General Comments 0
You need to be logged in to leave comments. Login now