Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share project-objects between multiple workspaces #179

Open
GoogleCodeExporter opened this issue Apr 8, 2015 · 0 comments
Open

Share project-objects between multiple workspaces #179

GoogleCodeExporter opened this issue Apr 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Affected Version: 1.12.16
Environment: Ubuntu 14.04 LTS

I work on many android baselines at once, each has a completely separate 
workspace. These workspaces use similar sets of git projects, but each may 
choose different branches in the manifest. This leads to significant disk space 
and network overhead to store and fetch the duplicate git history across many 
workspaces.

To attempt to address this, I started creating a common PROJECTS folder outside 
of all of my repo workspaces, and then creating symlinks in each 
$workspace/.repo/projects to ../../../PROJECTS/repo/projects. This accomplished 
the goals above, until a few things changed.

Here is an example to illustrate the problem:
workspace A:
<project path="foo" name="bar" />
workspace B:
<project path="foo" name="baz" />

With the project symlinks configured as above, doing a repo sync on workspace A 
gets the its "foo" project into the correct state, but will incorrectly change 
the remote in the workspace B "foo" project to point at "bar" instead of "baz".

Would you be able to add functionality to repo which handles the above case? 
Ideally I would like the repos in different workspaces to share branches, so 
that I can easily port and examine changes.



The problem is further complicated by Issue 141, which introduced the 
project-objects folder. This required me to create additional project-objects 
symlinks for each project as well.

If I understand https://gerrit-review.googlesource.com/#/c/50715 correctly, the 
closest solution would be to create symlinks for only the project-objects 
directory, and allow each workspace to have its own projects folder. This makes 
sense because project-objects is the bulk of the git storage, while projects is 
only branch names. However, this approach might cause problems with garbage 
collection, since repo won't be aware of how many places link to the same 
project-objects directory.

Original issue reported on code.google.com by fetti...@motorola.com on 11 Aug 2014 at 8:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant