Code review comment for lp:~guilhem-bichot/bzr/bzr-pull-verbose-shows-tip-before-pull

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

GuilhemBichot wrote:
> Hello John. Thanks much about the explanation about encoding of revids, I had mixed things a bit :-)
> This test fails:
> ./bzr selftest -v bzrlib.tests.blackbox.test_too_much.TestCommands.test_pull_verbose
> with this error:
...

> raise errors.NoSuchRevision(self, revision_id)
> NoSuchRevision: BzrBranch7('file:///tmp/testbzr-JIm8BM.tmp/bzrlib.tests.blackbox.test_too_much.TestCommands.test_pull_verbose/work/b/') has no revision guilhem@guilhem-laptop-20091209125135-072j1altswyqu916
>
> The reason is that this is a pull *--overwrite*, so this new code:
> old_dotted_revno = branch_to.revision_id_to_dotted_revno(
> result.old_revid)
> fails, because the branch after pull doesn't have this revid anymore (it was overwritten).
> I see two solutions:
> 1) print the revid (even though it's not in the branch anymore, it can still be used to recreate the past branch from another location)
> 2) print a message saying that the old revision is not there anymore (less helpful but does not violate UI policies).

Sorry, I meant to test this case and forgot about it by the end of it.

I could go either way. We do have '--show-ids' and 'bzr uncommit' does
show the revid because the revision cannot be accessed by any other means.

So probably show "revid:..." since that is consistent enough with
uncommit and others. (Only show revids when there isn't another way.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksfyTsACgkQJdeBCYSNAAPyHwCfeni1WzTaNbXXr1v2M7lmL9dI
ZbUAmwfQ9Cz6ySX0UcVmdrH+aXQ2ZIsT
=p3ak
-----END PGP SIGNATURE-----

« Back to merge proposal