Christian Hudon wrote:
> Heck, if people can agree on and include in this bug report the string
> that the improved error message should use, I'd be willing to... err...
> put my keyboard where my mouth is :-) and write and submit the patch.
> Anyone responsible for the bazaar UI, etc. who would care to suggest
> something?
>
So I think the issue boils down to...
There are technically 4 possibly objects that upgrade would want to change.
a) The repository format
b) The branch format
c) The working tree format
d) The 'bzrdir' format
The last one is the most obscure, and is, unfortunately, the one that is
getting displayed.
It is, essentially, just the way in which things are laid out under
.bzr. Namely that a repository is at '.bzr/repository' a branch is at
'.bzr/branch', etc.
We've also only had 1 'metadir' format, which is where the specific
files for a 'repository' are clearly distinct from the files for a 'branch'.
As such reporting that the bzrdir is up to date, is the least useful, as
it is the least likely one that you would want to upgrade.
The difficulty with the reporting, is that it potentially changes based
on what is present.
If you are in a directory with only a repository, then you should
probably get:
Repository Format is already at RepositoryFormat2a
If you are in a Branch in a shared repository, then you might expect
Branch Format is already at...
If you are in a lightweight checkout, then probably
WorkingTree Format is already at...
But there is also the possibility of combinations, such as in a
'standalone tree' where you have a repository, and a branch, and a
workingtree.
As such, I would think that as the internals of 'upgrade' are checking
to see what format a given object is at, it should report that to the user.
Found Branch format XXX, not upgrading
or
Found Branch format XXX, upgrading to BranchFormat YYY
And then the details would end up something like:
$ bzr init --pack-0.92 test-0.92
$ cd test-0.92
$ bzr upgrade
Found WorkingTreeFormat4, upgrading to WorkingTreeFormat6
Found BranchFormat5, upgrading to BranchFormat7
Found RepositoryKnitPack2, upgrading to RepositoryFormatCHK2
$ bzr upgrade
Found WorkingTreeFormat6, not upgrading
Found BranchFormat7, not upgrading
Found RepositoryFormatCHK2, not upgrading
[optionally] nothing to do
We may not want to show the "Format" object names, and instead show the
'concise' name [the one you can supply on the command line]. You can
look at the difference between "bzr info" and "bzr info -v".
The main problem there is that "--dirstate" is actually a combination of
a specific wt+branch+repository combination, so you can't always map
back cleanly from a WT to a given combined form. (A given WT can map to
maybe 4 short names, etc.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Hudon wrote:
> Heck, if people can agree on and include in this bug report the string
> that the improved error message should use, I'd be willing to... err...
> put my keyboard where my mouth is :-) and write and submit the patch.
> Anyone responsible for the bazaar UI, etc. who would care to suggest
> something?
>
So I think the issue boils down to...
There are technically 4 possibly objects that upgrade would want to change.
a) The repository format
b) The branch format
c) The working tree format
d) The 'bzrdir' format
The last one is the most obscure, and is, unfortunately, the one that is
getting displayed.
It is, essentially, just the way in which things are laid out under
.bzr. Namely that a repository is at '.bzr/repository' a branch is at
'.bzr/branch', etc.
We've also only had 1 'metadir' format, which is where the specific
files for a 'repository' are clearly distinct from the files for a 'branch'.
As such reporting that the bzrdir is up to date, is the least useful, as
it is the least likely one that you would want to upgrade.
The difficulty with the reporting, is that it potentially changes based
on what is present.
If you are in a directory with only a repository, then you should
probably get:
Repository Format is already at RepositoryFormat2a
If you are in a Branch in a shared repository, then you might expect
Branch Format is already at...
If you are in a lightweight checkout, then probably
WorkingTree Format is already at...
But there is also the possibility of combinations, such as in a
'standalone tree' where you have a repository, and a branch, and a
workingtree.
As such, I would think that as the internals of 'upgrade' are checking
to see what format a given object is at, it should report that to the user.
Found Branch format XXX, not upgrading
or
Found Branch format XXX, upgrading to BranchFormat YYY
And then the details would end up something like:
$ bzr init --pack-0.92 test-0.92 ack2, upgrading to RepositoryForma tCHK2 tCHK2, not upgrading
$ cd test-0.92
$ bzr upgrade
Found WorkingTreeFormat4, upgrading to WorkingTreeFormat6
Found BranchFormat5, upgrading to BranchFormat7
Found RepositoryKnitP
$ bzr upgrade
Found WorkingTreeFormat6, not upgrading
Found BranchFormat7, not upgrading
Found RepositoryForma
[optionally] nothing to do
We may not want to show the "Format" object names, and instead show the
'concise' name [the one you can supply on the command line]. You can
look at the difference between "bzr info" and "bzr info -v".
The main problem there is that "--dirstate" is actually a combination of repository combination, so you can't always map
a specific wt+branch+
back cleanly from a WT to a given combined form. (A given WT can map to
maybe 4 short names, etc.)
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq 87PgACgkQJdeBCY SNAANV/ QCgsPQHgMxjncN2 j4S5U0qgS/ Vh C6imbQZNiBoUjUU in
DEIAoM3QNBPWrZg
=TkA+
-----END PGP SIGNATURE-----