aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/git.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-06-21 07:28:48 -0400
committerW. Trevor King <wking@drexel.edu>2009-06-21 07:28:48 -0400
commit47901fbf10ba498a91a4701129a2f1959d00df67 (patch)
treeb8046cc2b8264a3b9cc2ab362ad70907bd755687 /libbe/git.py
parent133fdec6db0e01e77cc99d81cccd254dc1191dcc (diff)
parent6ecbe654d3f33cbfb90bb767bffbd252144d08c9 (diff)
downloadbugseverywhere-47901fbf10ba498a91a4701129a2f1959d00df67.tar.gz
Merge from Ben Finney's RCS unittest patch
This involved an `upgrade' of BE's bzr repo Previous version (via `bzr info path/to/repo`): pack-0.92 Current version: rich-root-pack The whole rich-root thing is a bzr features-vs-backwards-compatability thing they've been wrestling with [1,2,3,4,...]. It seems that BE was in some sort of unstable equilibrium [5], so I'll follow Ben's lead and make the official switch. Note that you'll need to use bzr>=1.5 to make the shift [6]. For the sake of completeness, the whole rich-root thing was introduced here [7], but I don't understand enough of bzr to make sense of the diff. It just versions the repo's root directory the same way it versions other directories [3]. The bzr people seem to be planning to phase out non-rich-root formats in favor of brisbane-core, aka 2.0beta [8], by bzr 2.0 [8], which is apparently on the horizon [9,10,11]. What a headache. Citations are all titles/X-List-Received-Date from https://lists.ubuntu.com/archives/bazaar/ with the exception of the URL [11]. [1] [RFC] rich root pack as default in 1.8 ? Sat, 06 Sep 2008 03:33:46 -0000 (conclusion: none) [2] Re: 1.9rc1 countdown Thu, 30 Oct 2008 08:44:53 -0000 (conclusion: "primary" format should be rich-root next time we make a new format) [3] So many repo formats Fri, 14 Nov 2008 08:41:33 -0000 Mon, 17 Nov 2008 07:37:47 -0000 (explains rich-root format) Mon, 17 Nov 2008 22:37:39 -0000 (explains no-return policy) Mon, 17 Nov 2008 20:57:08 -0000 (explicitly lists non-svn reasons for rich-root) [4] Branch fails from 'pack-0.92' repo to 'rich-root-pack' repo. Wed, 27 Aug 2008 11:31:11 -0000 (we're not sure again) [5] Branch fails from 'pack-0.92' repo to 'rich-root-pack' repo. Sun, 20 Apr 2008 12:58:09 -0000 [6] Branch fails from 'pack-0.92' repo to 'rich-root-pack' repo. Fri, 29 Aug 2008 13:23:52 -0000 [7] [RFC] Knit format 2 Fri, 25 Aug 2006 22:55:36 -0000 [8] bazaar 2.0beta format for launchpad release Fri, 29 May 2009 06:00:03 -0000 [9] Upgrading loggerhead to 1.9-rich-root Mon, 11 May 2009 22:35:28 -0000 (mentions eventual switch to rich-root in 2.0) [10] bzr 1.16rc1 released! Fri, 12 Jun 2009 08:00:08 -0000 (confirms eventual switch to rich-root in 2.0) [11] https://launchpad.net/bzr/+announcement/2733 (current outstanding releases: 1.17, 2.0)
Diffstat (limited to 'libbe/git.py')
-rw-r--r--libbe/git.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/libbe/git.py b/libbe/git.py
index e57014f..401b5e5 100644
--- a/libbe/git.py
+++ b/libbe/git.py
@@ -13,12 +13,15 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
import os
import re
+import sys
import unittest
import doctest
-from rcs import RCS, RCStestCase, CommandError
+import rcs
+from rcs import RCS
def new():
return Git()
@@ -91,9 +94,9 @@ class Git(RCS):
assert len(match.groups()) == 3
revision = match.groups()[1]
return revision
-
-class GitTestCase(RCStestCase):
- Class = Git
-unitsuite = unittest.TestLoader().loadTestsFromTestCase(GitTestCase)
+
+rcs.make_rcs_testcase_subclasses(Git, sys.modules[__name__])
+
+unitsuite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
suite = unittest.TestSuite([unitsuite, doctest.DocTestSuite()])