Discussion:
No WorkingTree exists after branching
Xue Fuqiao
2013-10-19 13:34:41 UTC
Permalink
I'd like to initialize my local bzr repo for Emacs after installing
bzr. Here's my procedure:

$ cd emacs-repo/
$ bzr init-repo main/
$ cd main/
$ bzr branch bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk trunk
Branched 114717 revisions.

Then I tried "bzr st":
$ bzr st
bzr: ERROR: No WorkingTree exists for
"file:///home/xfq/emacs-repo/main/trunk/.bzr/checkout/".

"ls" without options has no output, either. I'm not sure why. I read
the output of "bzr help branch" and searched existing FAQs/questions
but didn't get anything that looked promising. Can anyone point me in
the right direction?

---------------------------------------------------------------------------------------------------------------------
Here's my output of "bzr --version":
Bazaar (bzr) 2.6.0
Python interpreter: /usr/bin/python 2.7.5
Python standard library: /usr/lib/python2.7
Platform: Linux-3.11.0-12-generic-x86_64-with-Ubuntu-13.10-saucy
bzrlib: /usr/lib/python2.7/dist-packages/bzrlib
Bazaar configuration: /home/xfq/.bazaar
Bazaar log file: /home/xfq/.bzr.log
John Arbash Meinel
2013-10-19 14:36:27 UTC
Permalink
I thought the default for "bzr init-repo" was "--trees" which should
give you a a working tree.

If you don't have one, you can
cd trunk
bzr checkout

And then 'bzr st' etc should work.

John
=:->
Post by Xue Fuqiao
I'd like to initialize my local bzr repo for Emacs after installing
$ cd emacs-repo/ $ bzr init-repo main/ $ cd main/ $ bzr branch
114717 revisions.
Then I tried "bzr st": $ bzr st bzr: ERROR: No WorkingTree exists
for "file:///home/xfq/emacs-repo/main/trunk/.bzr/checkout/".
"ls" without options has no output, either. I'm not sure why. I
read the output of "bzr help branch" and searched existing
FAQs/questions but didn't get anything that looked promising. Can
anyone point me in the right direction?
---------------------------------------------------------------------------------------------------------------------
Bazaar (bzr) 2.6.0 Python interpreter: /usr/bin/python 2.7.5
/home/xfq/.bazaar Bazaar log file: /home/xfq/.bzr.log
Xue Fuqiao
2013-10-19 22:25:37 UTC
Permalink
On Sat, Oct 19, 2013 at 10:36 PM, John Arbash Meinel
Post by John Arbash Meinel
I thought the default for "bzr init-repo" was "--trees" which should
give you a a working tree.
If you don't have one, you can
cd trunk
bzr checkout
And then 'bzr st' etc should work.
Thanks for your attention. But I want a better solution. Every branch
I create (by using ‘bzr branch trunk/ BRANCHNAME/’) has no working tree
unless I use ‘bzr checkout’ explicitly. Why? I didn't customize my
Bazaar (except for ‘bzr whoami’), and it was installed by ‘sudo apt-get
install bzr’ on an Ubuntu machine.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-19 14:44:30 UTC
Permalink
Date: Sat, 19 Oct 2013 21:34:41 +0800
I'd like to initialize my local bzr repo for Emacs after installing
$ cd emacs-repo/
$ bzr init-repo main/
$ cd main/
Branched 114717 revisions.
$ bzr st
bzr: ERROR: No WorkingTree exists for
"file:///home/xfq/emacs-repo/main/trunk/.bzr/checkout/".
Sounds like your branch was somehow created with no working tree. Try
this to fix that:

$ cd /home/xfq/emacs-repo/main/trunk
$ bzr reconfigure --tree

It is possible that the repository was for some reason created to
produce tree-less branches. What does this say:

$ cd /home/xfq/emacs-repo/main
$ bzr info

If it says the repository is without trees, you can reconfigure that
as well:

$ cd /home/xfq/emacs-repo/main
$ bzr reconfigure --with-trees
Xue Fuqiao
2013-10-19 22:31:33 UTC
Permalink
Post by Eli Zaretskii
Post by Xue Fuqiao
I'd like to initialize my local bzr repo for Emacs after installing
$ cd emacs-repo/
$ bzr init-repo main/
$ cd main/
Branched 114717 revisions.
$ bzr st
bzr: ERROR: No WorkingTree exists for
"file:///home/xfq/emacs-repo/main/trunk/.bzr/checkout/".
Sounds like your branch was somehow created with no working tree. Try
$ cd /home/xfq/emacs-repo/main/trunk
$ bzr reconfigure --tree
Thanks.
Post by Eli Zaretskii
It is possible that the repository was for some reason created to
$ cd /home/xfq/emacs-repo/main
$ bzr info
It says "Shared repository with trees (format: 2a)". As I said to John,
every branch I create has no working tree unless I use ‘bzr checkout’
explicitly. So is there a better solution? I didn't customize my
Bazaar (except for ‘bzr whoami’).
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-20 02:43:21 UTC
Permalink
Date: Sun, 20 Oct 2013 06:31:33 +0800
=20
Post by Eli Zaretskii
$ cd /home/xfq/emacs-repo/main
$ bzr info
=20
It says "Shared repository with trees (format: 2a)". As I said to =
John,
every branch I create has no working tree unless I use =E2=80=98bzr=
checkout=E2=80=99
explicitly. So is there a better solution?
Unless your ~/.bzr.log says something related, downgrade to a previou=
s
version' I'd say: this sounds like a bug.
Xue Fuqiao
2013-10-20 23:16:36 UTC
Permalink
Date: Sun, 20 Oct 2013 06:31:33 +0800
Post by Eli Zaretskii
$ cd /home/xfq/emacs-repo/main
$ bzr info
It says "Shared repository with trees (format: 2a)". As I said to John,
every branch I create has no working tree unless I use ‘bzr checkout’
explicitly. So is there a better solution?
Unless your ~/.bzr.log says something related, downgrade to a previous
version' I'd say: this sounds like a bug.
I also tried bzr 2.6.0dev2 and 2.6.0dev3 with Python 2.7.4, but neither
of them has a working tree after branching. I've attached related sections of
my ~/.bzr.log.

(Maybe I should file a bug report in launchpad?)
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-21 02:43:39 UTC
Permalink
Date: Mon, 21 Oct 2013 07:16:36 +0800
=20
Date: Sun, 20 Oct 2013 06:31:33 +0800
Post by Eli Zaretskii
$ cd /home/xfq/emacs-repo/main
$ bzr info
It says "Shared repository with trees (format: 2a)". As I said =
to John,
every branch I create has no working tree unless I use =E2=80=
=98bzr checkout=E2=80=99
explicitly. So is there a better solution?
Unless your ~/.bzr.log says something related, downgrade to a pre=
vious
version' I'd say: this sounds like a bug.
=20
I also tried bzr 2.6.0dev2 and 2.6.0dev3 with Python 2.7.4, but nei=
ther
of them has a working tree after branching.
I said "downgrade", not "upgrade". That means go to 2.5.x.

But before you do, try doing this without plugins, using

bzr --no-plugins WHATEVER

That is, repeat the entire process, starting with "init-repo", when
you pass --no-plugins to bzr. Perhaps some plugin you have has this
effect.
I've attached related sections of my ~/.bzr.log.
I don't see anything there.
(Maybe I should file a bug report in launchpad?)
Definitely. But bugs in bzr are fixed very slowly, so in the meantim=
e
I suggest to find a solution.
Xue Fuqiao
2013-10-21 09:58:24 UTC
Permalink
Post by Eli Zaretskii
Post by Xue Fuqiao
Post by Xue Fuqiao
Post by Eli Zaretskii
$ cd /home/xfq/emacs-repo/main
$ bzr info
It says "Shared repository with trees (format: 2a)". As I said to John,
every branch I create has no working tree unless I use ‘bzr checkout’
explicitly. So is there a better solution?
Unless your ~/.bzr.log says something related, downgrade to a previous
version' I'd say: this sounds like a bug.
I also tried bzr 2.6.0dev2 and 2.6.0dev3 with Python 2.7.4, but neither
of them has a working tree after branching.
I said "downgrade", not "upgrade". That means go to 2.5.x.
Because I was using Bazaar 2.6.0 (the stable version) with Python
2.7.5. But anyway, I'll try the 2.5.1 release later.
Post by Eli Zaretskii
But before you do, try doing this without plugins, using
bzr --no-plugins WHATEVER
That is, repeat the entire process, starting with "init-repo", when
you pass --no-plugins to bzr. Perhaps some plugin you have has this
effect.
I didn't install any plugin manually. I only use the "changelog_merge"
plugin, but it was added to Bazaar in 2.4 Beta 1 and I didn't enable
this plugin in my {locations, branch}.conf.
Post by Eli Zaretskii
Post by Xue Fuqiao
I've attached related sections of my ~/.bzr.log.
I don't see anything there.
Thanks for your attention.
Post by Eli Zaretskii
Post by Xue Fuqiao
(Maybe I should file a bug report in launchpad?)
Definitely. But bugs in bzr are fixed very slowly, so in the meantime
I suggest to find a solution.
Will do it later.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Xue Fuqiao
2013-10-21 14:05:04 UTC
Permalink
And I found another problem (not sure if I should create a new thread,
since the two problems may be associated):

$ bzr up
Tree is up to date at revision 114731 of branch /home/xfq/emacs-repo/main/trunk

But the latest rev for trunk is 114734 instead of 114731.

I've already bound the local trunk to the upstream master by:

echo "public_branch =
bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk" >>
.bzr/branch/branch.conf
bzr bind bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk

I read the output of "bzr help {bind, update, pull, working-trees}" and
searched existing FAQs/questions but didn't get anything that looked
promising. Any ideas?
John Meinel
2013-10-21 16:22:21 UTC
Permalink
Public branch is not the bound localtion. You need to run "bzr bind" to
actually bind it. It will say "up to date with $REMOTE-LOCATION" rather
than the local path.

John
=:->
Post by Xue Fuqiao
And I found another problem (not sure if I should create a new thread,
$ bzr up
Tree is up to date at revision 114731 of branch
/home/xfq/emacs-repo/main/trunk
But the latest rev for trunk is 114734 instead of 114731.
echo "public_branch =
.bzr/branch/branch.conf
I read the output of "bzr help {bind, update, pull, working-trees}" and
searched existing FAQs/questions but didn't get anything that looked
promising. Any ideas?
Eli Zaretskii
2013-10-21 16:23:35 UTC
Permalink
Date: Mon, 21 Oct 2013 22:05:04 +0800
And I found another problem (not sure if I should create a new thread,
$ bzr up
Tree is up to date at revision 114731 of branch /home/xfq/emacs-repo/main/trunk
But the latest rev for trunk is 114734 instead of 114731.
echo "public_branch =
.bzr/branch/branch.conf
I read the output of "bzr help {bind, update, pull, working-trees}" and
searched existing FAQs/questions but didn't get anything that looked
promising. Any ideas?
It sounds like your branch is not bound after all. There should be
these 2 lines in .bzr/branch/branch.conf of a bound branch:

parent_location = bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk/
bound_location = bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk/
Xue Fuqiao
2013-10-21 22:17:47 UTC
Permalink
Post by Eli Zaretskii
It sounds like your branch is not bound after all. There should be
Thanks, there are four lines:

parent_location = bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk/
public_branch = bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk
bound_location = bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk/
bound = False

If I change the "False" to "True", "bzr up" will succeed. But I don't
know why it is "False", since I have already used ‘bzr bind’. I read
‘bzr help {bound, bound_location, bind, unbind}’, but they said nothing.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-22 02:49:54 UTC
Permalink
Date: Tue, 22 Oct 2013 06:17:47 +0800
=20
=20
k/
/
bound =3D False
=20
If I change the "False" to "True", "bzr up" will succeed.
Yes, it should be True.
But I don't know why it is "False", since I have already used =E2=
=80=98bzr
bind=E2=80=99.
Neither do I. Your bzr does weird things.
Xue Fuqiao
2013-10-26 00:04:15 UTC
Permalink
On Tue, Oct 22, 2013 at 10:49 AM, Eli Zaretskii <***@gnu.org> wrote:

I just tried --no-plugins and it worked:

~$ cd emacs-repo/
~/emacs-repo$ bzr --no-plugins init-repo main/
Shared repository with trees (format: 2a)
Location:
shared repository: main
~/emacs-repo$ cd main/
~/emacs-repo/main$ bzr --no-plugins branch
bzr+ssh://***@bzr.savannah.gnu.org/emacs/trunk trunk
Branched 114808 revisions.
~/emacs-repo/main$ cd trunk/
~/emacs-repo/main/trunk$ ls
admin ChangeLog etc leim m4 nt
autogen config.bat GNUmakefile lib make-dist oldXMenu
autogen.sh configure.ac info lib-src Makefile.in README
BUGS COPYING INSTALL lisp msdos src
build-aux doc INSTALL.BZR lwlib nextstep test

Thanks for your tip.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-26 06:27:39 UTC
Permalink
Date: Sat, 26 Oct 2013 08:04:15 +0800
So now you need to find out which plugin does this, and consider
disabling it, unless you really-really need it.
Xue Fuqiao
2013-10-26 22:24:50 UTC
Permalink
Post by Eli Zaretskii
So now you need to find out which plugin does this, and consider
disabling it, unless you really-really need it.
Maybe the culprit isn't the plugins. I spent many hours redoing the
original procedure without changing the Bazaar/Python/OS version.
Surprisingly, sometimes there's a WorkingTree, sometimes not. Looks
like a heisenbug... Anyway, I found that if there is no WorkingTree,
the first ‘bzr branch’ operation in a new repository will take more time.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-27 03:44:44 UTC
Permalink
Date: Sun, 27 Oct 2013 06:24:50 +0800
=20
Post by Eli Zaretskii
So now you need to find out which plugin does this, and consider
disabling it, unless you really-really need it.
=20
Maybe the culprit isn't the plugins. I spent many hours redoing th=
e
original procedure without changing the Bazaar/Python/OS version.
Surprisingly, sometimes there's a WorkingTree, sometimes not. Look=
s
like a heisenbug... Anyway, I found that if there is no WorkingTre=
e,
the first =E2=80=98bzr branch=E2=80=99 operation in a new repositor=
y will take more time.

Did you try comparing the .bzr.log records for the successful and
unsuccessful operations?

Also, did you try with --no-plugins several times, and if so, are you
saying that this, too, sometimes creates a tree and sometimes doesn't=
?
(If --no-plugins is consistent, then you could have an inconsistently
buggy plugin.)
Xue Fuqiao
2013-10-27 04:54:34 UTC
Permalink
Post by Eli Zaretskii
Post by Xue Fuqiao
Maybe the culprit isn't the plugins. I spent many hours redoing the
original procedure several times without changing the
Bazaar/Python/OS version. Surprisingly, sometimes there's a
WorkingTree, sometimes not. Looks like a heisenbug... Anyway, I
found that if there is no WorkingTree, the first ‘bzr branch’
operation in a new repository will take more time.
Did you try comparing the .bzr.log records for the successful and
unsuccessful operations?
Yes, but I saw nothing abnormal.
Post by Eli Zaretskii
Also, did you try with --no-plugins several times, and if so, are you
saying that this, too, sometimes creates a tree and sometimes doesn't?
(If --no-plugins is consistent, then you could have an inconsistently
buggy plugin.)
No. The first ‘bzr branch’ takes too much time (2-5 hours on my
machine), and I can only test them on weekends. I'll spend time trying
them in the future, but not in the near future.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Eli Zaretskii
2013-10-27 16:13:37 UTC
Permalink
Date: Sun, 27 Oct 2013 12:54:34 +0800
=20
Also, did you try with --no-plugins several times, and if so, are=
you
saying that this, too, sometimes creates a tree and sometimes doe=
sn't?
(If --no-plugins is consistent, then you could have an inconsiste=
ntly
buggy plugin.)
=20
No. The first =E2=80=98bzr branch=E2=80=99 takes too much time (2-=
5 hours on my
machine), and I can only test them on weekends.
Perhaps there's a way to do this testing locally, once you have a
single repository. Maybe someone here could suggest the exact
procedure.
Vincent Ladeuil
2013-10-28 10:04:11 UTC
Permalink
Post by Xue Fuqiao
Post by Eli Zaretskii
Post by Xue Fuqiao
Maybe the culprit isn't the plugins. I spent many hours redoing the
original procedure several times without changing the
Bazaar/Python/OS version. Surprisingly, sometimes there's a
WorkingTree, sometimes not. Looks like a heisenbug... Anyway, I
found that if there is no WorkingTree, the first ‘bzr branch’
operation in a new repository will take more time.
Did you try comparing the .bzr.log records for the successful and
unsuccessful operations?
Yes, but I saw nothing abnormal.
You can check 'bzr config debug_flags' and add 'hpss' if it's not there
to enable more debug output related to the smart server (which bzr+ssh
uses).
Post by Xue Fuqiao
Post by Eli Zaretskii
Also, did you try with --no-plugins several times, and if so, are you
saying that this, too, sometimes creates a tree and sometimes doesn't?
(If --no-plugins is consistent, then you could have an inconsistently
buggy plugin.)
No. The first ‘bzr branch’ takes too much time (2-5 hours on my
machine),
Don't remove the repository, that's where the revisions you spend 2-5
hours to acquire are stored.

Instead, use 'bzr info' in the shared repository to check that it's
properly configured before 'bzr branch' and after.

I.e.:

$ bzr init-repo emacs
Shared repository with trees (format: 2a)
Location:
shared repository: emacs
vila:~/tmp :) $ cd emacs
vila:~/tmp/emacs :) $ bzr info
Shared repository with trees (format: 2a)
Location:
shared repository: .

Above, bzr said twice that the repository will create a working tree
("with trees").

'bzr' checks for a file named 'no-working-trees' in '.bzr/repository' to
decide whether or not working trees are created so either this file is
created in your repo or bzr is looking at a wrong place. But it *has* to
find such a file somewhere to *not* create a wt.

Vincent
Xue Fuqiao
2013-10-28 11:42:28 UTC
Permalink
On Mon, Oct 28, 2013 at 6:04 PM, Vincent Ladeuil <v.ladeuil+***@free.fr> wrote:

Hi Vincent,
Post by Vincent Ladeuil
Post by Xue Fuqiao
Post by Eli Zaretskii
Post by Xue Fuqiao
Maybe the culprit isn't the plugins. I spent many hours redoing the
original procedure several times without changing the
Bazaar/Python/OS version. Surprisingly, sometimes there's a
WorkingTree, sometimes not. Looks like a heisenbug... Anyway, I
found that if there is no WorkingTree, the first ‘bzr branch’
operation in a new repository will take more time.
Did you try comparing the .bzr.log records for the successful and
unsuccessful operations?
Yes, but I saw nothing abnormal.
You can check 'bzr config debug_flags' and add 'hpss' if it's not there
to enable more debug output related to the smart server (which bzr+ssh
uses).
I'll try, thank you.
Post by Vincent Ladeuil
Post by Xue Fuqiao
Post by Eli Zaretskii
Also, did you try with --no-plugins several times, and if so, are you
saying that this, too, sometimes creates a tree and sometimes doesn't?
(If --no-plugins is consistent, then you could have an inconsistently
buggy plugin.)
No. The first ‘bzr branch’ takes too much time (2-5 hours on my
machine),
Don't remove the repository, that's where the revisions you spend 2-5
hours to acquire are stored.
Instead, use 'bzr info' in the shared repository to check that it's
properly configured before 'bzr branch' and after.
But you didn't use ‘bzr branch’ in the following procedure. Am I
missing something?
Post by Vincent Ladeuil
$ bzr init-repo emacs
Shared repository with trees (format: 2a)
shared repository: emacs
vila:~/tmp :) $ cd emacs
vila:~/tmp/emacs :) $ bzr info
Shared repository with trees (format: 2a)
shared repository: .
Above, bzr said twice that the repository will create a working tree
("with trees").
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Vincent Ladeuil
2013-10-28 15:40:26 UTC
Permalink
Post by Xue Fuqiao
But you didn't use ‘bzr branch’ in the following procedure. Am I
missing something?
Sorry, I wasn't clear. I only outline the steps to check whether a repo
will create a working tree or not.

Whether some bug is triggered by 'bzr branch' later can still be
diagnosed with 'bzr info'.
Post by Xue Fuqiao
Post by Vincent Ladeuil
$ bzr init-repo emacs
Shared repository with trees (format: 2a)
shared repository: emacs
vila:~/tmp :) $ cd emacs
vila:~/tmp/emacs :) $ bzr info
Shared repository with trees (format: 2a)
shared repository: .
Above, bzr said twice that the repository will create a working tree
("with trees").
I.e. from that point you can:

$ bzr branch <url> trunk
$ bzr info
$ cd trunk
$ bzr info

Vincent

Vincent Ladeuil
2013-10-26 14:21:38 UTC
Permalink
Sorry for late reply :-/
Post by Eli Zaretskii
Date: Tue, 22 Oct 2013 06:17:47 +0800
bound = False
If I change the "False" to "True", "bzr up" will succeed.
Yes, it should be True.
But I don't know why it is "False", since I have already used ‘bzr
bind’.
Neither do I. Your bzr does weird things.
I think this sums it up quite nicely: you seem to encounter issues
nobody else can reproduce :-/ I.e. *unless* you're using a shared
repository that you explicitly configured to *not* create working trees
you shouldn't end up with a branch without a working tree.

If you're still encountering the issue, here are a few commands to check
your bzr install:

- 'bzr version' will gives you details about which bzr is used with
which library,

- 'bzr plugins -v' will gives your details about which plugins are
installed and where they are installed

- 'bzr --no-plugins <command> <args>' will run bzr without any plugins
(be aware that this means that *core* bzr plugins like launchpad
access are also disabled in that case). This helps diagnosing issues
caused by any plugin,

- 'BZR_PLUGINS_PATH=-site bzr <command> <args>' will run bzr with the
core plugins only. This is the preferred way to rule out user and
system-wide installed plugins.

- 'bzr config' in any directory will tell you which config options are
active for the current working tree, branch or repository,

- 'bzr config <option>=<value>', 'bzr config --remove <option>' will
update the config files when used in the right directories (using the
previous 'bzr config' is a good way to check before and after these
commands that you're modifying the right config file). There is no
need to edit the config files by hand and avoid corrupting them.

Vincent
Eli Zaretskii
2013-10-21 16:24:33 UTC
Permalink
Date: Mon, 21 Oct 2013 17:58:24 +0800
Post by Eli Zaretskii
But before you do, try doing this without plugins, using
bzr --no-plugins WHATEVER
That is, repeat the entire process, starting with "init-repo", when
you pass --no-plugins to bzr. Perhaps some plugin you have has this
effect.
I didn't install any plugin manually.
That doesn't mean you don't have any; they could have come with the
installation. Try "bzr plugins" to see the list.
Loading...