From f46825b93dc664d5497ba9d99f842686da3bb007 Mon Sep 17 00:00:00 2001 From: chipx86 Date: Sat, 18 Jul 2009 21:59:08 +0000 Subject: 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/ --- rbtools/postreview.py | 12 ++++++++++-- 1 file 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: -- cgit v1.2.3