Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 763:84f9ac74cc30
Added deprecation warnings if -t or --text is used for commits.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 22 Jul 2005 16:27:30 +0100 |
parents | 312b4a10d862 |
children | eea96285cbf9 |
comparison
equal
deleted
inserted
replaced
762:312b4a10d862 | 763:84f9ac74cc30 |
---|---|
458 | 458 |
459 d.close() | 459 d.close() |
460 | 460 |
461 def commit(ui, repo, *files, **opts): | 461 def commit(ui, repo, *files, **opts): |
462 """commit the specified files or all outstanding changes""" | 462 """commit the specified files or all outstanding changes""" |
463 if opts['text']: | |
464 ui.warn("Warning: -t and --text is deprecated," | |
465 " please use -m or --message instead.\n") | |
463 message = opts['message'] or opts['text'] | 466 message = opts['message'] or opts['text'] |
464 logfile = opts['logfile'] | 467 logfile = opts['logfile'] |
465 if not message and logfile: | 468 if not message and logfile: |
466 try: | 469 try: |
467 message = open(logfile).read() | 470 message = open(logfile).read() |
789 r = repo.push(other) | 792 r = repo.push(other) |
790 return r | 793 return r |
791 | 794 |
792 def rawcommit(ui, repo, *flist, **rc): | 795 def rawcommit(ui, repo, *flist, **rc): |
793 "raw commit interface" | 796 "raw commit interface" |
797 if rc['text']: | |
798 ui.warn("Warning: -t and --text is deprecated," | |
799 " please use -m or --message instead.\n") | |
794 message = rc['message'] or rc['text'] | 800 message = rc['message'] or rc['text'] |
795 if not message and rc['logfile']: | 801 if not message and rc['logfile']: |
796 try: | 802 try: |
797 message = open(rc['logfile']).read() | 803 message = open(rc['logfile']).read() |
798 except IOError: | 804 except IOError: |
985 for f in u: | 991 for f in u: |
986 ui.write("? ", f, "\n") | 992 ui.write("? ", f, "\n") |
987 | 993 |
988 def tag(ui, repo, name, rev=None, **opts): | 994 def tag(ui, repo, name, rev=None, **opts): |
989 """add a tag for the current tip or a given revision""" | 995 """add a tag for the current tip or a given revision""" |
996 if opts['text']: | |
997 ui.warn("Warning: -t and --text is deprecated," | |
998 " please use -m or --message instead.\n") | |
990 if name == "tip": | 999 if name == "tip": |
991 ui.warn("abort: 'tip' is a reserved name!\n") | 1000 ui.warn("abort: 'tip' is a reserved name!\n") |
992 return -1 | 1001 return -1 |
993 if rev: | 1002 if rev: |
994 r = hg.hex(repo.lookup(rev)) | 1003 r = hg.hex(repo.lookup(rev)) |