summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchipx86 <chipx86@5efc13c4-1f27-0410-8691-ff2d1f55687e>2009-07-18 21:59:08 +0000
committerchipx86 <chipx86@5efc13c4-1f27-0410-8691-ff2d1f55687e>2009-07-18 21:59:08 +0000
commitf46825b93dc664d5497ba9d99f842686da3bb007 (patch)
treeb09a47871604f22b09e51b518692845d5b4d9412
parentb431db585ae7a132bc9764b64770f86a61569ddf (diff)
Patch by Chris Clark to define a SCMCLIENTS list containing all known
SCMClients, which makes it easier to update and maintain. Reviewed at http://reviews.review-board.org/r/882/
-rwxr-xr-xrbtools/postreview.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index f266378..8fa8ce2 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -2005,6 +2005,15 @@ class GitClient(SCMClient):
pass
+SCMCLIENTS = (
+ SVNClient(),
+ CVSClient(),
+ GitClient(),
+ MercurialClient(),
+ PerforceClient(),
+ ClearCaseClient(),
+)
+
def debug(s):
"""
Prints debugging information if post-review was run with --debug
@@ -2389,8 +2398,7 @@ def determine_client():
tool = None
# Try to find the SCM Client we're going to be working with.
- for tool in (SVNClient(), CVSClient(), GitClient(), MercurialClient(),
- PerforceClient(), ClearCaseClient()):
+ for tool in SCMCLIENTS:
repository_info = tool.get_repository_info()
if repository_info: