From f1a6b14fdc5402f9ed765a8a342d9c07c5b91e2d Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 3 Jun 2009 16:01:11 -0700 Subject: Create an abstract Manifest base class This will help as we add support for another manifest type. Signed-off-by: Shawn O. Pearce --- command.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'command.py') diff --git a/command.py b/command.py index a941b95a..5ca43f20 100644 --- a/command.py +++ b/command.py @@ -17,6 +17,8 @@ import os import optparse import sys +import manifest_loader + from error import NoSuchProjectError class Command(object): @@ -24,7 +26,6 @@ class Command(object): """ common = False - manifest = None _optparse = None def WantPager(self, opt): @@ -57,6 +58,13 @@ class Command(object): """ raise NotImplementedError + @property + def manifest(self): + return self.GetManifest() + + def GetManifest(self, reparse=False): + return manifest_loader.GetManifest(self.repodir, reparse) + def GetProjects(self, args, missing_ok=False): """A list of projects that match the arguments. """ -- cgit v1.2.3-54-g00ecf