Page MenuHomePhabricator

D16172.diff
No OneTemporary

D16172.diff

diff --git a/scripts/ssh/ssh-connect.php b/scripts/ssh/ssh-connect.php
--- a/scripts/ssh/ssh-connect.php
+++ b/scripts/ssh/ssh-connect.php
@@ -88,7 +88,22 @@
$arguments[] = AlmanacKeys::getKeyPath('device.key');
}
+// Subversion passes us a host in the form "domain.com:port", which is not
+// valid for normal SSH but which we can parse into a valid "-p" flag.
+
+$passthru_args = $unconsumed_argv;
+$host = array_shift($passthru_args);
+$parts = explode(':', $host, 2);
+$host = $parts[0];
+
$port = $args->getArg('port');
+
+if (!$port) {
+ if (count($parts) == 2) {
+ $port = $parts[1];
+ }
+}
+
if ($port) {
$pattern[] = '-p %d';
$arguments[] = $port;
@@ -96,7 +111,9 @@
$pattern[] = '--';
-$passthru_args = $unconsumed_argv;
+$pattern[] = '%s';
+$arguments[] = $host;
+
foreach ($passthru_args as $passthru_arg) {
$pattern[] = '%s';
$arguments[] = $passthru_arg;

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 7:38 PM (22 h, 8 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6790634
Default Alt Text
D16172.diff (901 B)

Event Timeline