Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 19465: Add username/password as global option.

  • Loading branch information...
commit 876ba54cd2ff90c353997552112d71b1ebb4448f 1 parent 5e3af72
@opi99 authored
Showing with 26 additions and 1 deletion.
  1. +26 −1 SVN/Command.php
View
27 SVN/Command.php
@@ -150,11 +150,25 @@
*
* If the specified fetchmode isn't available, raw output will be returned.
*
- * @var int
+ * @var int $fetchmode
*/
public $fetchmode = VERSIONCONTROL_SVN_FETCHMODE_ASSOC;
/**
+ * The username to use for connections.
+ *
+ * @var string $username
+ */
+ public $username = '';
+
+ /**
+ * The password to use for connections.
+ *
+ * @var string $password
+ */
+ public $password = '';
+
+ /**
* SVN subcommand to run.
*
* @var string $commandName
@@ -339,6 +353,17 @@ protected function preProcessSwitches()
$this->switches['xml'] = true;
}
$this->switches['non-interactive'] = true;
+
+ if (!isset($this->switches['username'])
+ && '' !== $this->username
+ ) {
+ $this->switches['username'] = $this->username;
+ }
+ if (!isset($this->switches['password'])
+ && '' !== $this->password
+ ) {
+ $this->switches['password'] = $this->password;
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.