comparison hgext/record.py @ 20171:a765611e06dc

record: --user/-u now works with record when ui.username not set (issue3857) The -u flag didn't work when ui.username was not set and resulted in an abort message. This was fixed by checking for the 'user' key in the opts dictionary. If the key is present, the step causing the exception is not executed.
author Prasoon Shukla <prasoon92.iitr@gmail.com>
date Thu, 12 Dec 2013 12:25:56 +0530
parents e012a20061ed
children 061766323061
comparison
equal deleted inserted replaced
20170:574f3b6e0e8b 20171:a765611e06dc
500 if not ui.interactive(): 500 if not ui.interactive():
501 raise util.Abort(_('running non-interactively, use %s instead') % 501 raise util.Abort(_('running non-interactively, use %s instead') %
502 cmdsuggest) 502 cmdsuggest)
503 503
504 # make sure username is set before going interactive 504 # make sure username is set before going interactive
505 ui.username() 505 if not opts.get('user'):
506 ui.username() # raise exception, username not provided
506 507
507 def recordfunc(ui, repo, message, match, opts): 508 def recordfunc(ui, repo, message, match, opts):
508 """This is generic record driver. 509 """This is generic record driver.
509 510
510 Its job is to interactively filter local changes, and 511 Its job is to interactively filter local changes, and