mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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 <sop@google.com>
This commit is contained in:
parent
87bda12e85
commit
a7ce096047
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user