GuilhemBichot wrote:
> Hi John. By "Only show revids when there isn't another way" do you mean that "bzr pull -v" should display the old tip's revid only if this revision isn't present in the branch anymore?
> Or do you mean that we should just print revid of old and new tips, and no revnos, no matter if the old revision exists or not? Or something else (if you have an example)?
Print the dotted revno unless the old tip is no longer in the history,
then display revid:...
Just catch the exception, and print a different message indicating that
the old revision isn't in the ancestry any more, and this is what it was.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
GuilhemBichot wrote:
> Hi John. By "Only show revids when there isn't another way" do you mean that "bzr pull -v" should display the old tip's revid only if this revision isn't present in the branch anymore?
> Or do you mean that we should just print revid of old and new tips, and no revnos, no matter if the old revision exists or not? Or something else (if you have an example)?
Print the dotted revno unless the old tip is no longer in the history,
then display revid:...
Just catch the exception, and print a different message indicating that
the old revision isn't in the ancestry any more, and this is what it was.
I'll put a simple example in my branch: builtins. py' report( self.outf) to.revision_ id_to_dotted_ revno( write(' Tip revision before pull was: %s\n' revno,) ) to.revision_ id_to_dotted_ revno( NoSuchRevision: write(' Tip revision no longer in ancestry.' old_revid, )) write(' Tip revision before pull was: %s\n' branch_ change( tests/blackbox/ test_pull. py' tests/blackbox/ test_pull. py 2009-12-08 17:41:06 +0000 tests/blackbox/ test_pull. py 2009-12-09 17:29:36 +0000 ainsRe( out, 'Tip revision before pull was: 1.1.2') verbose_ prints_ not_in_ ancestry_ tip(self) : branch_ builder( 'source' ) start_series( ) build_snapshot( 'A', None, [ build_snapshot( 'B', ['A'], []) build_snapshot( 'C', ['B'], []) build_snapshot( 'D', ['A', 'B'], []) finish_ series( ) get_branch( ) (b.unlock) sprout( 'target' , revision_id='C') ainsRe( out, 'Tip revision no longer in ancestry.' verbose_ does_not_ print_tip_ when_nothing_ is_pulled( self): branch_ and_tree( 'parent' ) commit( message= 'first commit', rev_id= 'number- one')
> === modified file 'bzrlib/
> --- bzrlib/builtins.py 2009-12-08 17:48:04 +0000
> +++ bzrlib/builtins.py 2009-12-09 17:29:36 +0000
> @@ -1031,11 +1031,16 @@
> % (target, result.old_revid, result.new_revid))
> result.
> if verbose and result.old_revid != result.new_revid:
> - old_dotted_revno = branch_
> - result.old_revid)
> - old_dotted_revno = '.'.join([str(i) for i in old_dotted_revno])
> - self.outf.
> - % (old_dotted_
> + try:
> + old_revno_in_to = branch_
> + result.old_revid)
> + old_revstr = '.'.join([str(i) for i in old_revno_in_to])
> + except errors.
> + self.outf.
> + ' Was revid:%s\n' % (result.
> + else:
> + self.outf.
> + % (old_revstr,))
> log.show_
> branch_to, self.outf, result.old_revno,
> result.old_revid)
>
> === modified file 'bzrlib/
> --- bzrlib/
> +++ bzrlib/
> @@ -415,6 +415,23 @@
> out = self.run_bzr('pull -d target -v')[0]
> self.assertCont
>
> + def test_pull_
> + builder = self.make_
> + builder.
> + builder.
> + ('add', ('', 'TREE_ROOT', 'directory', None))])
> + builder.
> + builder.
> + builder.
> + builder.
> + b = builder.
> + b.lock_write()
> + self.addCleanup
> + b.bzrdir.
> + out = self.run_bzr('pull -d target -v --overwrite')[0]
> + self.assertCont
> + ' Was revid:C')
> +
> def test_pull_
> parent = self.make_
> rev1 = parent.
You can get it from lp:///~jameinel/bzr/2.1.0b4-pull-v
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks f3tMACgkQJdeBCY SNAANZiACfR+ fiyif2MlHBeXQkm z0U2sJR o/Z93uxxTphF5Xx 6k
PWgAnRwvmuj0Ic4
=0p75
-----END PGP SIGNATURE-----