mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
Added deprecation warnings if -t or --text is used for commits.
This commit is contained in:
parent
aafc5792d1
commit
ba5a4e2eff
@ -460,6 +460,9 @@ def clone(ui, source, dest=None, **opts):
|
|||||||
|
|
||||||
def commit(ui, repo, *files, **opts):
|
def commit(ui, repo, *files, **opts):
|
||||||
"""commit the specified files or all outstanding changes"""
|
"""commit the specified files or all outstanding changes"""
|
||||||
|
if opts['text']:
|
||||||
|
ui.warn("Warning: -t and --text is deprecated,"
|
||||||
|
" please use -m or --message instead.\n")
|
||||||
message = opts['message'] or opts['text']
|
message = opts['message'] or opts['text']
|
||||||
logfile = opts['logfile']
|
logfile = opts['logfile']
|
||||||
if not message and logfile:
|
if not message and logfile:
|
||||||
@ -791,6 +794,9 @@ def push(ui, repo, dest="default-push"):
|
|||||||
|
|
||||||
def rawcommit(ui, repo, *flist, **rc):
|
def rawcommit(ui, repo, *flist, **rc):
|
||||||
"raw commit interface"
|
"raw commit interface"
|
||||||
|
if rc['text']:
|
||||||
|
ui.warn("Warning: -t and --text is deprecated,"
|
||||||
|
" please use -m or --message instead.\n")
|
||||||
message = rc['message'] or rc['text']
|
message = rc['message'] or rc['text']
|
||||||
if not message and rc['logfile']:
|
if not message and rc['logfile']:
|
||||||
try:
|
try:
|
||||||
@ -987,6 +993,9 @@ def status(ui, repo, *pats, **opts):
|
|||||||
|
|
||||||
def tag(ui, repo, name, rev=None, **opts):
|
def tag(ui, repo, name, rev=None, **opts):
|
||||||
"""add a tag for the current tip or a given revision"""
|
"""add a tag for the current tip or a given revision"""
|
||||||
|
if opts['text']:
|
||||||
|
ui.warn("Warning: -t and --text is deprecated,"
|
||||||
|
" please use -m or --message instead.\n")
|
||||||
if name == "tip":
|
if name == "tip":
|
||||||
ui.warn("abort: 'tip' is a reserved name!\n")
|
ui.warn("abort: 'tip' is a reserved name!\n")
|
||||||
return -1
|
return -1
|
||||||
|
Loading…
Reference in New Issue
Block a user