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:
Traceback (most recent call last):
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/tests/blackbox/test_too_much.py", line 150, in test_pull_verbose
out = self.run_bzr('pull --overwrite --verbose ../a')[0]
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/tests/__init__.py", line 1887, in run_bzr
working_dir=working_dir,
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/tests/__init__.py", line 1798, in _run_bzr_autosplit
encoding=encoding, stdin=stdin, working_dir=working_dir,
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/tests/__init__.py", line 1831, in _run_bzr_core
args)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/tests/__init__.py", line 2125, in apply_redirected
return a_callable(*args, **kwargs)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/commands.py", line 1139, in run_bzr_catch_user_errors
return run_bzr(argv)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/commands.py", line 1037, in run_bzr
ret = run(*run_argv)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/commands.py", line 654, in run_argv_aliases
return self.run(**all_cmd_args)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/builtins.py", line 1034, in run
result.old_revid)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/decorators.py", line 140, in read_locked
result = unbound(self, *args, **kwargs)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/branch.py", line 346, in revision_id_to_dotted_revno
return self._do_revision_id_to_dotted_revno(revision_id)
File "/home/mysql_src/logiciels/bzr_versions/bzr-pull-verbose-shows-tip-before-pull/bzrlib/branch.py", line 366, in _do_revision_id_to_dotted_revno
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).
Hello John. Thanks much about the explanation about encoding of revids, I had mixed things a bit :-) tests.blackbox. test_too_ much.TestComman ds.test_ pull_verbose mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ tests/blackbox/ test_too_ much.py" , line 150, in test_pull_verbose mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ tests/_ _init__ .py", line 1887, in run_bzr dir=working_ dir, mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ tests/_ _init__ .py", line 1798, in _run_bzr_autosplit encoding, stdin=stdin, working_ dir=working_ dir, mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ tests/_ _init__ .py", line 1831, in _run_bzr_core mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ tests/_ _init__ .py", line 2125, in apply_redirected mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ commands. py", line 1139, in run_bzr_ catch_user_ errors mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ commands. py", line 1037, in run_bzr mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ commands. py", line 654, in run_argv_aliases **all_cmd_ args) mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ builtins. py", line 1034, in run old_revid) mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ decorators. py", line 140, in read_locked mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ branch. py", line 346, in revision_ id_to_dotted_ revno revision_ id_to_dotted_ revno(revision_ id) mysql_src/ logiciels/ bzr_versions/ bzr-pull- verbose- shows-tip- before- pull/bzrlib/ branch. py", line 366, in _do_revision_ id_to_dotted_ revno NoSuchRevision( self, revision_id) 'file:/ //tmp/testbzr- JIm8BM. tmp/bzrlib. tests.blackbox. test_too_ much.TestComman ds.test_ pull_verbose/ work/b/ ') has no revision guilhem@ guilhem- laptop- 20091209125135- 072j1altswyqu91 6
This test fails:
./bzr selftest -v bzrlib.
with this error:
Traceback (most recent call last):
File "/home/
out = self.run_bzr('pull --overwrite --verbose ../a')[0]
File "/home/
working_
File "/home/
encoding=
File "/home/
args)
File "/home/
return a_callable(*args, **kwargs)
File "/home/
return run_bzr(argv)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
result.
File "/home/
result = unbound(self, *args, **kwargs)
File "/home/
return self._do_
File "/home/
raise errors.
NoSuchRevision: BzrBranch7(
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).