Comment 2 for bug 613804

Revision history for this message
Jasper St. Pierre (jstpierre) wrote : Re: [Bug 613804] [NEW] `bzr revert -r . ` failed with traceback

Well, I found out that bzr revert is by default recursive!

On Thu, Aug 5, 2010 at 8:48 PM, Martin Pool <email address hidden> wrote:
> Obviously we shouldn't give a traceback, but it looks like this wasn't
> really the command he/she meant to type.
>
> --
> Martin
>
> --
> `bzr revert -r . ` failed with traceback
> https://bugs.launchpad.net/bugs/613804
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Bazaar Version Control System: Confirmed
>
> Bug description:
> reported by magcius on #bzr: error while running `bzr revert -r.`
>
> bzr: ERROR: bzrlib.errors.ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file:///home/jstpierre/Source/ffmp3/fogg/.bzr/branch/)
>
> Traceback (most recent call last):
>  File "/home/python2.6/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
>    return the_callable(*args, **kwargs)
>  File "/home/python2.6/site-packages/bzrlib/commands.py", line 1055, in run_bzr
>    ret = run(*run_argv)
>  File "/home/python2.6/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
>    return self.run_direct(**all_cmd_args)
>  File "/home/python2.6/site-packages/bzrlib/commands.py", line 665, in run_direct
>    return self._operation.run_simple(*args, **kwargs)
>  File "/home/python2.6/site-packages/bzrlib/cleanup.py", line 122, in run_simple
>    self.cleanups, self.func, *args, **kwargs)
>  File "/home/python2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
>    result = func(*args, **kwargs)
>  File "/home/python2.6/site-packages/bzrlib/builtins.py", line 4153, in run
>    self._revert_tree_to_revision(tree, revision, file_list, no_backup)
>  File "/home/python2.6/site-packages/bzrlib/builtins.py", line 4157, in _revert_tree_to_revision
>    rev_tree = _get_one_revision_tree('revert', revision, tree=tree)
>  File "/home/python2.6/site-packages/bzrlib/builtins.py", line 144, in _get_one_revision_tree
>    rev_tree = revision.as_tree(branch)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 257, in as_tree
>    return self._as_tree(context_branch)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 266, in _as_tree
>    revision_id = self.as_revision_id(context_branch)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 240, in as_revision_id
>    return self._as_revision_id(context_branch)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 248, in _as_revision_id
>    return self.in_history(context_branch).rev_id
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 222, in in_history
>    return self._match_on_and_check(branch, revs)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 201, in _match_on_and_check
>    info = self._match_on(branch, revs)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 327, in _match_on
>    return self._try_spectype(rs_class, branch)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 309, in _try_spectype
>    return rs.in_history(branch)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 222, in in_history
>    return self._match_on_and_check(branch, revs)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 201, in _match_on_and_check
>    info = self._match_on(branch, revs)
>  File "/home/python2.6/site-packages/bzrlib/revisionspec.py", line 817, in _match_on
>    branch.fetch(other_branch, revision_b)
>  File "/home/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
>    self.lock_write()
>  File "/home/python2.6/site-packages/bzrlib/branch.py", line 2144, in lock_write
>    return self.control_files.lock_write(token=token)
>  File "/home/python2.6/site-packages/bzrlib/lockable_files.py", line 188, in lock_write
>    raise errors.ReadOnlyError(self)
> ReadOnlyError: A write attempt was made in a read only transaction on LockableFiles(lock, file:///home/jstpierre/Source/ffmp3/fogg/.bzr/branch/)
>
> bzr 2.1.2 on python 2.6.5 (Linux-2.6.34-ARCH-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-glibc2.0)
> arguments: ['/usr/bin/bzr', 'revert', '-r', '.']
> encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
> plugins:
>  bzrtools             /home/python2.6/site-packages/bzrlib/plugins/bzrtools [2.1.0]
>  launchpad            /home/python2.6/site-packages/bzrlib/plugins/launchpad [2.1.2]
>  loom                 /home/python2.6/site-packages/bzrlib/plugins/loom [1.4.0dev]
>  netrc_credential_store /home/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.1.2]
>  news_merge           /home/python2.6/site-packages/bzrlib/plugins/news_merge [2.1.2]
>
> *** Bazaar has encountered an internal error.  This probably indicates a
>    bug in Bazaar.  You can help us fix it by filing a bug report at
>        https://bugs.launchpad.net/bzr/+filebug
>    including this traceback and a description of the problem.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/bzr/+bug/613804/+subscribe
>