"bzr push" to a bound branch without a working tree
Eli Zaretskii
eliz at gnu.org
Wed May 18 08:57:06 UTC 2011
> Date: Wed, 18 May 2011 10:17:45 +0200
> From: John Arbash Meinel <john at arbash-meinel.com>
> CC: bazaar at lists.canonical.com
>
> If quickfixes is a lightweight checkout of trunk, and trunk is a bound
> branch to upstream trunk, then committing in "quickfixes" will commit
> directly to local trunk, which commits to remote trunk.
But quickfixes is not a lightweight checkout, at least AFAIK. It was
created by a "bzr branch" command without any switches. I see both a
.bzr/branch/ directory and a .bzr/checkout/ directory there.
> > D:\usr\eli\bzr\emacs\trunk>bzr merge ../quickfixes
> > NoWorkingTree: No WorkingTree exists for "file:///D:/usr/eli/bzr/emacs/trunk/.bzr/checkout/".
> >
> > Is this expected? I don't think the documentation of "merge" says
> > anything about working trees.
>
> You have to have a tree to merge. Because we are merging the contents of
> one branch into another, giving you an opportunity to commit. And
> hopefully its obvious that you have to have a tree to commit.
No, it isn't obvious. (I already asked a long time ago to have some
detailed explanation of what each of these commands do to the tree and
to the history.) I thought that a tree-less branch has all the
information about the files and the revision history in the branch
meta-data. E.g., I can "bzr diff" in the tree-less branch, and it
works even though there's no tree with files to diff against. Merging
does not only merge the file contents, does it? Committing certainly
stores deltas from the new changes in the branch meta-data, doesn't
it? So, at least conceptually, a commit could work without files at
all, by storing the necessary information in the meta-data.
I realize that I'm missing something important, but please point me to
some documentation, if it exists, that would have prevented me from
missing that.
> > . Then I tried pushing from quickfixes/ to trunk/. This also
> > failed:
> >
> > D:\usr\eli\bzr\emacs\trunk>cd ../quickfixes
> >
> > D:\usr\eli\bzr\emacs\quickfixes>bzr push ../trunk
> > Connected (version 2.0, client OpenSSH_5.5p1)
> > Authentication (publickey) successful!
> > Secsh channel 1 opened.
> > Connected (version 2.0, client OpenSSH_5.5p1)hing stream
> > Authentication (publickey) successful!
> > Secsh channel 1 opened.
> > bzr: ERROR: Could not acquire lock "(remote lock)": bzr+ssh://eliz@bzr.savannah.gnu.org/emacs/
> >
> > It sounds like it tried to acquire a second lock while the first
> > was still in use, and that failed, is that right? Here's what I
> > have in .bzr.log about this:
>
> 1) It doesn't make sense to push from a branch to itself, which is what
> you are doing. Since quickfixes is a lightweight checkout *of* trunk,
> pushing from quickfixes to trunk is pushing to itself.
But since it isn't a lightweight checkout, I don't think that
consideration applies.
> > Is this configuration (a tree-less bound branch and its child local
> > branch with a tree) supported? If so, did I do something wrong?
> >
> > TIA
> >
>
> It is perfectly supported.
So what would be a possible workflow in this arrangement? Let's say I
made a change in quickfixes and want to push it upstream, what should
I do?
> One thing that could have helped. Run "bzr log" in trunk, and notice
> that your commit is already there.
I perhaps would have thought of that if bzr would tell me something
along the lines of "revision NNN is already here". But how could I
possibly have guessed that given the error messages shown in my OP?
The commit to quickfixes didn't say anything extraordinary, so I had
no clue it had any effect except committing to that local branch.
Thanks.
More information about the bazaar
mailing list