changeset 2786 | f4d916351366 |
parent 2760 | e6bef16b6cec |
child 2788 | 1e8b8107a2c9 |
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -611,6 +611,9 @@ if os.name == 'nt': def samestat(s1, s2): return False + def shellquote(s): + return '"%s"' % s.replace('"', '\\"') + def explain_exit(code): return _("exited with status %d") % code, code @@ -700,6 +703,9 @@ else: else: raise + def shellquote(s): + return "'%s'" % s.replace("'", "'\\''") + def testpid(pid): '''return False if pid dead, True if running or not sure''' try: