Ticket #2656 (new defect)

Opened 2 years ago

Last modified 2 years ago

"sage -hg" does not handle quoting correctly

Reported by: cwitty Owned by: was
Priority: major Milestone: sage-4.5.3
Component: user interface Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

If you use "sage -hg" with arguments containing spaces, like:

  sage -hg commit -m "This is my great new code."

then the argument gets split up, so Mercurial sees something more like

  hg commit -m This is my great new code.

(and tries to check in files named is,my,great,new,code., with a commit message of "This").

Change History

Changed 2 years ago by mabshoff

We need to escape the '"' (and probably some other characters):

[mabshoff@localhost ~]$ ./foo.bash commit -m "This is my great new code."
commit -m This is my great new code.
[mabshoff@localhost ~]$ ./foo.bash commit -m \"This is my great new code.\"
commit -m "This is my great new code."

where foo.bash is

#!/bin/bash
echo "$@"

Cheers,

Michael

Note: See TracTickets for help on using tickets.