Naive questions re hard-linking repositories

Paul Moore p.f.moore at gmail.com
Thu Apr 16 08:53:26 BST 2009


2009/4/16 Andrew Cowie <andrew at operationaldynamics.com>:
> On Wed, 2009-04-15 at 17:26 +1000, Ian Clatworthy wrote:
>
>> Right. Defaults matter because they say a lot about how a tool is
>> expected to be used in the common case. I rarely prefer git's UI over
>> ours but, going back to the root problem, I think their choice of
>> two separate commands - clone vs branch - is a wise one. The reality
>> is that Doing The Right Thing varies IMO w.r.t. "branching" from a
>> remote location vs branching from a local one. For remote, you nearly
>> always mean "get me my own copy of history" while local
>> branching is all about "start me a new line of development". The
>> yet-another-complete-copy-of-history in the local case *by default* is
>> somewhere between worthless and harmful (cause it consumes unnecessary
>> time & resources).
>
> Well said.

For me, the big problem with shared repos vs standalone branches is
the complexity of setting them up. As you say, branching from a remote
repository is about getting the history, so bzr branch http://... gets
everything, and is the "obvious" answer.

Now I want to start a new local line of development. bzr branch a b
seems the obvious thing to do. After all, a key point of a DVCS is for
all repositories (local or remote) to be equal, so why shouldn't I use
the same command here? But it isn't correct (as a was cloned from
remote and isn't in a shared repo). Rather, I have to (rather,
"should"):

1. Create a repo
2. bzr branch a into the repo
3. Change to use the new copy of as in the repo, rather than the one I
was using (which may involve transferring local uncommitted changes,
fixing up directories in scripts, etc)
4. bzr branch a b in the repo

Now, I know that I should have set up a repo in the first place - but
that assumes I knew I was going to create the second branch.

I'd argue that having "bzr branch a b" do anything other than *work*
by default (where "work" means to do something sensible and
supported!) is irritating and bad UI design. Having the simplest form
of a command report that you shouldn't be using this is hardly
user-friendly... Having 2 similar commands whose main difference is
that you use one for a local branch and one for a remote branch is
equally user-hostile.

Paul.



More information about the bazaar mailing list