diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1854,16 +1854,17 @@ class Project(object): | |||
1854 | if GitCommand(self, cmd).Wait() != 0: | 1854 | if GitCommand(self, cmd).Wait() != 0: |
1855 | raise GitError('%s merge %s ' % (self.name, head)) | 1855 | raise GitError('%s merge %s ' % (self.name, head)) |
1856 | 1856 | ||
1857 | def _InitGitDir(self): | 1857 | def _InitGitDir(self, mirror_git=None): |
1858 | if not os.path.exists(self.gitdir): | 1858 | if not os.path.exists(self.gitdir): |
1859 | os.makedirs(self.gitdir) | 1859 | os.makedirs(self.gitdir) |
1860 | self.bare_git.init() | 1860 | self.bare_git.init() |
1861 | 1861 | ||
1862 | mp = self.manifest.manifestProject | 1862 | mp = self.manifest.manifestProject |
1863 | ref_dir = mp.config.GetString('repo.reference') | 1863 | ref_dir = mp.config.GetString('repo.reference') or '' |
1864 | 1864 | ||
1865 | if ref_dir: | 1865 | if ref_dir or mirror_git: |
1866 | mirror_git = os.path.join(ref_dir, self.name + '.git') | 1866 | if not mirror_git: |
1867 | mirror_git = os.path.join(ref_dir, self.name + '.git') | ||
1867 | repo_git = os.path.join(ref_dir, '.repo', 'projects', | 1868 | repo_git = os.path.join(ref_dir, '.repo', 'projects', |
1868 | self.relpath + '.git') | 1869 | self.relpath + '.git') |
1869 | 1870 | ||