lightweight checkout outside repo directory

Asked by Alok

It seems to me that when a branch or checkout is created in a shared repo, it must be within a sub-directory of the shared repo. Is it possible to have a shared repo on a server, and directly create a lightweight checkout from it on local machine without creating a local mirror carrying the entire history? The local machines now only carry the working tree together with a reference to the shared repo.

Better yet, is it possible to have the working tree locally together with just the last commit from the originating shared repo so that diffs and merges could be done locally without network traffic, while still not having the whole history locally?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Belchenko
Solved:
Last query:
Last reply:
Revision history for this message
Alexander Belchenko (bialix) said :
#1

Bazaar using branches as main objects which holds pointer to latest committed revision. Shared repository is just storage optimization. So you need to create light checkout from the branch, not from shared repo. But you can put one branch in the root of the shared repo.

Revision history for this message
Alok (alokgovil) said :
#2

Thanks Alexander. This clarifies a bit. So it seems now that I do not need a shared-repo.

Here is what I understood: I can have a stand-alone branch (that includes a repo) residing on the server that I call main-line. I can then do light-weight checkouts from the main-line to local machines (the local machines now do not get complete history). Commits to the local checkout will automatically try to push to the main-line, which will fail if someone else committed to the main-line in the meanwhile. In this case merge must be performed on the local machine first before committing. (This is the work-flow I am considering -- central initially and switch to distributed later.)

Revision history for this message
Best Alexander Belchenko (bialix) said :
#3

With lightweight checkout commit does not push, but instead does commit directly on your main-line branch. If somebody has out-of-date light checkout then he/she should run `bzr update` and this will do merge of changes from main-line and local changes in the local working tree. Using light checkout is very close to CVS workflow.

Revision history for this message
Alok (alokgovil) said :
#4

Thanks Alexander Belchenko, that solved my question.