comparison mercurial/commands.py @ 29029:224dd889ecd0 stable

graft: fix printing of --continue command Properly shell quote arguments, to avoid printing commands that won't work when run literally. For example, a date string with timestamp needs to be quoted: --date '1456953053 28800'
author Adam Simpkins <simpkins@fb.com>
date Wed, 27 Apr 2016 19:24:31 -0700
parents 602cc9bf036e
children add26c663aad aaabed77791a
comparison
equal deleted inserted replaced
29028:67fd250b7c21 29029:224dd889ecd0
4229 # write out state for --continue 4229 # write out state for --continue
4230 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] 4230 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]]
4231 repo.vfs.write('graftstate', ''.join(nodelines)) 4231 repo.vfs.write('graftstate', ''.join(nodelines))
4232 extra = '' 4232 extra = ''
4233 if opts.get('user'): 4233 if opts.get('user'):
4234 extra += ' --user %s' % opts['user'] 4234 extra += ' --user %s' % util.shellquote(opts['user'])
4235 if opts.get('date'): 4235 if opts.get('date'):
4236 extra += ' --date %s' % opts['date'] 4236 extra += ' --date %s' % util.shellquote(opts['date'])
4237 if opts.get('log'): 4237 if opts.get('log'):
4238 extra += ' --log' 4238 extra += ' --log'
4239 hint=_("use 'hg resolve' and 'hg graft --continue%s'") % extra 4239 hint=_("use 'hg resolve' and 'hg graft --continue%s'") % extra
4240 raise error.Abort( 4240 raise error.Abort(
4241 _("unresolved conflicts, can't continue"), 4241 _("unresolved conflicts, can't continue"),