bzr should not allow push over shared repository

Bug #237439 reported by Russ Brown
2
Affects Status Importance Assigned to Milestone
Bazaar
Won't Fix
Undecided
Unassigned

Bug Description

bzr push doesn't seem to mind if you specify a shared repository as its destination (the shared repository directory itself, not a subdirectory of it).

This strikes me as being potentially quite dangerous.

Revision history for this message
John A Meinel (jameinel) wrote :

why is it dangerous? You are creating a branch at a given URL. There is nothing preventing you from doing it to any other place, such as:

bzr push .../repo/branch/subbranch

I personally think it could be very useful:
http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html#nested-style-project-branch-sub-branch

But I may be one of the few people who feel that way.

Revision history for this message
Russ Brown (pickscrape) wrote :

Hmm, maybe it's my lack of understanding then. In my head I see a shared repository as being a place for branches to be stored underneath, not a branch itself, and that is certainly how we intend to use it.

I can however also see one of my colleagues accidentally pushing a branch over the shared repository itself, instead of underneath it, and I'm uncertain of what effect that would have on the shared repository itself. If the answer to that is zero, then I suppose it doesn't matter.

The nested branches example in the page given intrigues me. Is the history for all of those branches stored in the shared repository at the root? Does that happen in all cases (i.e. bzr always scans for the first shared repository it finds in its parent directories), or does it work by creating branches within branches which all refer to the same root shared repository?

Revision history for this message
John A Meinel (jameinel) wrote :

bzr always scans for the first shared repository it can find in parent directories.

Revision history for this message
James Westby (james-w) wrote :

Hi,

Pushing a branch to the same location as a shared repository
does indeed cause no problems.

The only downside could be that the user doesn't realise that
the branch is also a shared repository and so deletes it.

We could detect the situation and provide an informative
message, but that's at the time that it happens, and
wouldn't necessarily help when the user came to delete
the branch.

I'm closing this report as "Won't fix", but if you disagree
then please feel free to re-open it.

Thanks,

James

Changed in bzr:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.