# # # patch "ChangeLog" # from [5a450bcf176e5365d6412e8260298161696d9ca3] # to [18c4e2fdfb85ec965a17efe9ffa97bb7b5051297] # # patch "std_hooks.lua" # from [614066fdf36561a75e035ba121c8f18aae0a69dc] # to [29e090db74372425eb9f1e35d448c2c9d992f274] # ============================================================ --- ChangeLog 5a450bcf176e5365d6412e8260298161696d9ca3 +++ ChangeLog 18c4e2fdfb85ec965a17efe9ffa97bb7b5051297 @@ -1,3 +1,8 @@ +2006-05-28 Matt Johnston + + * std_hooks.lua (get_netsync_connect_command): quote patterns + so that remote shells won't expand them. + 2006-05-28 Graydon Hoare * visualc/monotone.vcproj: Fix for package revision generation ============================================================ --- std_hooks.lua 614066fdf36561a75e035ba121c8f18aae0a69dc +++ std_hooks.lua 29e090db74372425eb9f1e35d448c2c9d992f274 @@ -704,6 +704,7 @@ function get_netsync_connect_command(uri, args) local argv = nil + local quote_patterns = false if uri["scheme"] == "ssh" and uri["host"] @@ -720,6 +721,7 @@ end table.insert(argv, uri["host"]) + quote_patterns = true end if uri["scheme"] == "file" and uri["path"] then @@ -742,13 +744,22 @@ table.insert(argv, "--stdio") table.insert(argv, "--no-transport-auth") + -- patterns must be quoted to avoid a remote shell expanding them if args["include"] then - table.insert(argv, args["include"]) + local include = args["include"] + if quote_patterns then + include = "'" .. args["include"] .. "'" + end + table.insert(argv, include) end if args["exclude"] then table.insert(argv, "--exclude") - table.insert(argv, args["exclude"]) + local exclude = args["exclude"] + if quote_patterns then + exclude = "'" .. args["exclude"] .. "'" + end + table.insert(argv, exclude) end end return argv