Bazaar for a web-based CMS

roehnsch at informatik.hu-berlin.de roehnsch at informatik.hu-berlin.de
Tue Dec 16 13:00:11 GMT 2008


Hi, I'll try and address some of your issues, though I'm not completely
familiar with Bazaar myself yet.

> I'm developing a web-based content management system in Python, and would
> like to use bazaar to manage the content.
>
> This is my proposed model:
>  - A main branch where the content is stored (central repository, no
> trees)
>  - A lightweight checkout where the content is accessed from
>  - Each user has his own branch
>
> All these are stored on the same server. These steps are followed when a
> user edits 'n page on the site:
>  - The file in the user's branch is modified.
>  - When the user is done, the changes are committed (to the user's branch)
>  - A merge is run on the user's branch, and any conflicts are resolved,
> and committed
>  - The user's branch is pushed to the central repository
>  - The lightweight checkout is updated to reflect the changes
>
> A user can also do a checkout of his branch on the server to make local
> edits, the rest of the process is the same.
>
>
> Would this model work?


I'd tend to say yes. Though there's a problem with resolving the
conflicts. It sounds like you want to handle that automatically. That's up
to you then, I guess. Commonly, conflicts have to be resolved by the user,
which somehow interferes with the idea of the CMS hiding the
implementation details of saving the changes from the user.

You may also have to lock the main branch between the merge and the push
steps. That way you can guarantee that the main branch hasn't changed
again, after merging the top revision.


> Is it better to use a central repository with trees, and access the data
> from there, or a lightweight checkout as in my proposed model?
>
> One problem I have with this model is that it might not scale well: if
> there are thousands of pages and many users, it's not ideal to keep a
> complete up-to-date branch for each user. So is it possible at all to only
> store the modified files in the user branches?


When all your branches are on the server anyway, using a Shared Repository
would be recommended, I guess. It shouldn't matter whether to use the tree
layout or the lightweight checkout layout, either. With a Shared
Repository, Bazaar can optimise the data of all attached branches.
Duplicates shouldn't really exist that way. So you can scale all you want.

Talking about only storing the modified files, that's exactly the idea of
a Stacked Branch. Though I'm not sure you really need that for your
approach.


> How does concurrent operations work in Bazaar? What happens if two users
> try to commit (different files) at the same time?


Yeah, I'd like to know that, too. Supposedly it is first come, first
serve. The next one to commit will get the error message that his branch
isn't up to date or something.

Regards,
Alexander





More information about the bazaar mailing list