Mercurial > hg
changeset 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 | 67fd250b7c21 |
children | 18c1b107898e |
files | mercurial/commands.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Apr 29 14:14:00 2016 -0500 +++ b/mercurial/commands.py Wed Apr 27 19:24:31 2016 -0700 @@ -4231,9 +4231,9 @@ repo.vfs.write('graftstate', ''.join(nodelines)) extra = '' if opts.get('user'): - extra += ' --user %s' % opts['user'] + extra += ' --user %s' % util.shellquote(opts['user']) if opts.get('date'): - extra += ' --date %s' % opts['date'] + extra += ' --date %s' % util.shellquote(opts['date']) if opts.get('log'): extra += ' --log' hint=_("use 'hg resolve' and 'hg graft --continue%s'") % extra