[patch] 'bzr mv' with no arguments breaks

Robert Collins robertc at robertcollins.net
Thu Jul 6 05:33:51 BST 2006


On Wed, 2006-07-05 at 08:50 -0500, John Arbash Meinel wrote:
> Wouter van Heyst wrote:
> > Moshe Zadka reported bzr mv failing with 
> > bzr: ERROR: exceptions.TypeError: len() of unsized object
> > 
> > The issue itself is easy to fix, but in writing a test I decided to
> > extract old move tests from too_much.OldTests. Ouch.
> > 
> > I'm not really happy with the result, one problem I don't understand is that
> > commit on a workingtree works differently than self.run_bzr('commit')
> 
> One thing you have to be aware of, is that a WorkingTree object won't
> necessarily reload its state if you use run_bzr behind its back.
> 
> So doing:
> 
> wt = self.make_branch_and_tree('.')
> ...
> self.run_bzr('mv', 'a', 'b')
> 
> You may need to do one of:
> self.wt.read_inventory()
> 
> or
> self.wt = self.wt.bzrdir.open_workingtree()

You should only need to do this if you are changing the working tree
format: WorkingTree lock acquisition *should* reload any state that has
changed from disk.

If it doesn't, I would call that a severe bug in WorkingTree.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060706/c5dc92bc/attachment.pgp 


More information about the bazaar mailing list