Allow upgrading all configured sites at once

Review Request #4204 — Created June 4, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Allow upgrading all configured sites at once


Store installation paths to sitelist file during 'rb-site install'
Manually installed two sites, verified that their paths were properly added to the sitelist file (specified at the command-line), then ran 'rb-site upgrade' and verified that it looped through both.
From c1c05ebe4313ac29d006be9064c0e323597409ab Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 4 Jun 2013 15:19:01 -0400
Subject: [PATCH 2/2] Allow upgrading all configured sites at once
---
 reviewboard/cmdline/rbsite.py | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)
diff --git a/reviewboard/cmdline/rbsite.py b/reviewboard/cmdline/rbsite.py
index ed7f1f575490c17219b69ad44af137c3dface38b..5e2c8c8e3479a05400e6e3f2f016c6b5f0bfa843 100755
--- a/reviewboard/cmdline/rbsite.py
+++ b/reviewboard/cmdline/rbsite.py
@@ -1843,6 +1843,9 @@ class UpgradeCommand(Command):
         group.add_option("--no-db-upgrade", action="store_false",
                          dest="upgrade_db", default=True,
                          help="don't upgrade the database")
+        group.add_option("--all-sites", action="store_true",
+                         dest="all_sites", default=False,
+                         help="Upgrade all 
From 86298ee27bac6458abdd4a9c2fd5027136bdb2ee Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 4 Jun 2013 14:47:38 -0400
Subject: [PATCH 1/2] Store installation paths to sitelist file during 'rb-site
 install'
---
 reviewboard/cmdline/rbsite.py | 76 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 74 insertions(+), 2 deletions(-)
diff --git a/reviewboard/cmdline/rbsite.py b/reviewboard/cmdline/rbsite.py
index 6b72c83bf7a4aec16d9bada270571ab4af822467..1b0b67febd4b7ba94c179bb3b2fee84560956bf7 100755
--- a/reviewboard/cmdline/rbsite.py
+++ b/reviewboard/cmdline/rbsite.py
@@ -18,6 +18,8 @@ from reviewboard import get_version_string
 
 DOCS_BASE = "http://www.reviewboard.org/docs/manual/dev/"
 
+SITELIST_FILE_UNIX = "/etc/reviewboard/sites"
+
 
 # See if GTK is a possibility.
 try:
@@ -639,6 +641,58 @@ class Site(object):
         fp.close()
 
 
+class SiteList(object):
+    """Maintains the list of sites installed on the system."""
+    def __

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 6. See what's changed.

orig
1
2
3
4
5
6
reviewboard/cmdline/rbsite.py
Loading...