From a7ce096047a7707edc572de375b700d161b9520b Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 3 Jul 2009 18:04:27 -0700 Subject: [PATCH] Allow meta projects to be created not under .repo/ Some types of manifests might prefer to put their meta project work tree under topdir, rather than inside of the .repo/ directory. We can support that by allowing relpath to be optionally passed in. Signed-off-by: Shawn O. Pearce --- project.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/project.py b/project.py index c79e8fb9..beacc92f 100644 --- a/project.py +++ b/project.py @@ -1426,15 +1426,17 @@ class SyncBuffer(object): class MetaProject(Project): """A special project housed under .repo. """ - def __init__(self, manifest, name, gitdir, worktree): + def __init__(self, manifest, name, gitdir, worktree, relpath=None): repodir = manifest.repodir + if relpath is None: + relpath = '.repo/%s' % name Project.__init__(self, manifest = manifest, name = name, gitdir = gitdir, worktree = worktree, remote = RemoteSpec('origin'), - relpath = '.repo/%s' % name, + relpath = relpath, revisionExpr = 'refs/heads/master', revisionId = None)