diff options
| author | Shawn O. Pearce <sop@google.com> | 2009-07-03 18:04:27 -0700 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2009-07-03 20:50:52 -0700 |
| commit | a7ce096047a7707edc572de375b700d161b9520b (patch) | |
| tree | 343563212fe4fe24de905685038ede22d8e9e5e8 /project.py | |
| parent | 87bda12e85ffb98778d7ac881edb0210b74c0491 (diff) | |
| download | git-repo-a7ce096047a7707edc572de375b700d161b9520b.tar.gz | |
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>
Diffstat (limited to 'project.py')
| -rw-r--r-- | project.py | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1426,15 +1426,17 @@ class SyncBuffer(object): | |||
| 1426 | class MetaProject(Project): | 1426 | class MetaProject(Project): |
| 1427 | """A special project housed under .repo. | 1427 | """A special project housed under .repo. |
| 1428 | """ | 1428 | """ |
| 1429 | def __init__(self, manifest, name, gitdir, worktree): | 1429 | def __init__(self, manifest, name, gitdir, worktree, relpath=None): |
| 1430 | repodir = manifest.repodir | 1430 | repodir = manifest.repodir |
| 1431 | if relpath is None: | ||
| 1432 | relpath = '.repo/%s' % name | ||
| 1431 | Project.__init__(self, | 1433 | Project.__init__(self, |
| 1432 | manifest = manifest, | 1434 | manifest = manifest, |
| 1433 | name = name, | 1435 | name = name, |
| 1434 | gitdir = gitdir, | 1436 | gitdir = gitdir, |
| 1435 | worktree = worktree, | 1437 | worktree = worktree, |
| 1436 | remote = RemoteSpec('origin'), | 1438 | remote = RemoteSpec('origin'), |
| 1437 | relpath = '.repo/%s' % name, | 1439 | relpath = relpath, |
| 1438 | revisionExpr = 'refs/heads/master', | 1440 | revisionExpr = 'refs/heads/master', |
| 1439 | revisionId = None) | 1441 | revisionId = None) |
| 1440 | 1442 | ||
