comparison mercurial/commands.py @ 27899:78b9fdb844c1

graft: warn when -r is combined with revisions as positional arguments The behaviour in this case is undefined. Instead of silently doing something "random" and surprising, at least issue a warning. (This should perhaps be considered a "deprecation" and turned into an error in a future release.)
author Mads Kiilerich <madski@unity3d.com>
date Sun, 17 Jan 2016 19:33:02 +0100
parents 2cc44efcb7cf
children 645e78845383
comparison
equal deleted inserted replaced
27898:2cc44efcb7cf 27899:78b9fdb844c1
3887 ''' 3887 '''
3888 with repo.wlock(): 3888 with repo.wlock():
3889 return _dograft(ui, repo, *revs, **opts) 3889 return _dograft(ui, repo, *revs, **opts)
3890 3890
3891 def _dograft(ui, repo, *revs, **opts): 3891 def _dograft(ui, repo, *revs, **opts):
3892 if revs and opts['rev']:
3893 ui.warn(_('warning: inconsistent use of --rev might give unexpected '
3894 'revision ordering!\n'))
3895
3892 revs = list(revs) 3896 revs = list(revs)
3893 revs.extend(opts['rev']) 3897 revs.extend(opts['rev'])
3894 3898
3895 if not opts.get('user') and opts.get('currentuser'): 3899 if not opts.get('user') and opts.get('currentuser'):
3896 opts['user'] = ui.username() 3900 opts['user'] = ui.username()