New branch created accidentally
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 26 20:33:13 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1/26/2011 12:13 PM, Eric Siegerman wrote:
> On 1/26/2011 3:48 AM, Ewan Milne wrote:
>> One specific corner case: if one has a shared repo, location <repo>,
>> and a branch below <branch>, then one accidentally pushes to <repo>
>> instead of <repo>/<branch>. This results in a new branch created in
>> the same location as <repo>, so the new branch can't be removed by
>> deleting the directory. I think that deleting the <repo>/.bzr/branch
>> directory will remove the branch - is that correct?
>
> Ouch! I'm surprised that's even possible -- I'd have expected
> bzr to complain. But I've just tested it, and it succeeds.
> This behaviour seems dangerous; because it's a corner case that
> one won't be expecting, one could easily fall into the trap Ewan
> describes, thus accidentally nuking the entire shared repo.
>
> So the question is, is it useful? If not, I think bzr should
> refuse to do it. Do you agree?
The original use case was that you can define whatever naming structure
that you want for your project. For example you could do:
bzr branch $URL/project
trunk of the project
bzr branch $URL/2.3
a release series for the project
bzr branch $URL/2.3/feature
an in progress feature that is targeted at the 2.3 series
Most people seem to have decided that they don't want a nested
namespace. So they only want to be able to do:
bzr branch $URL/project/trunk project
bzr branch $URL/project/series/2.3
bzr branch $URL/project/features/2.3-feature
So instead of using '/' to denote hierarchy they use sibling directories
and redundant naming. (2.3-feature rather than 2.3/feature).
Is there sufficient momentum in that space that bzr should *enforce*
that policy? I've gone from "no" to "maybe". I don't think I'm at
"definitely" yet.
>
> What about with --use-existing-dir? I lean towards refusing even
> then, on the assumption that --use-existing-dir is intended to
> let you turn a totally non-bzr (and typically empty) directory
> into a branch, not to reconfigure an existing bzr-controlled
> directory -- and especially not into something weird and
> unexpected.
>
> - Eric
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1AhQkACgkQJdeBCYSNAANm/wCgyKdH0OM62CTXgvcBOtCs43fK
ljEAoMk0IB5Xlap8ys8d3PNNYCQFfzK4
=CEtQ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list