summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Kim <justin.kim@collabora.com>2016-11-26 00:18:17 +0900
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-02-17 09:36:55 -0300
commitfd44d2f906b5dcbc656c45ab71f460308e599488 (patch)
treece69bc72c0218ee4220dd2a9f573ec2c9d88ca7e
parent66665d9339ad143d4ec8097408e9189e71b69494 (diff)
Re-enable '--arcrc' option
In some cases like testing, it requires to be a different user by using different token or ceritificate in arcrc. This feature was originally created in D833, but disappeared with D851. Signed-off-by: Justin Kim <justin.kim@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D1509
-rwxr-xr-xgit-phab7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-phab b/git-phab
index 11054ee..2d95223 100755
--- a/git-phab
+++ b/git-phab
@@ -104,6 +104,13 @@ class GitPhab:
if self._phabricator:
return self._phabricator
+ if self.arcrc:
+ try:
+ with open(self.arcrc) as f:
+ phabricator.ARCRC.update(json.load(f))
+ except FileNotFoundError:
+ self.die("Failed to load a given arcrc file, %s" % self.arcrc)
+
needs_credential = False
try:
host = self.phabricator_uri + "/api/"