Comment 8 for bug 393366

Revision history for this message
David I (david-ingamells) wrote : Re: [Bug 393366] Re: KeyError in knit.simple_annotate running annotate on a stacked branch

Martin Pool wrote:
> 2009/6/30 David I <email address hidden>:
>
>> Is there anything more I can do to help track this bug down?
>>
>
> If you can provide a reproduction in non-private data either as a
> script or a tarball that would be excellent.
>
>
The script I sent before was completely self-contained. I can't pare it
down much more that that ;)

Here is a more abstract version. When I checked this script I notice
that the annotate does not fail every time. Running with a pause after
the last run seems to consistently fail, but running twice with no pause
often succeeds on the second try.

#!/bin/bash
local_host=`hostname`
remote_host=mscvs01

repos_root=/data/users/david.ingamells/temp/bzr/repos
branch_root=/data/users/david.ingamells/temp/bzr/work

repos_name=1.0

cd ${repos_root}

bzr init --1.9-rich-root ${repos_name}

# the following init does not result in a fail:
#bzr init ${repos_name}

cd ${repos_name}
echo "Hello" > file
bzr add file
bzr commit -m "first file"
bzr remove-tree

ssh ${remote_host} ". .profile; cd ${branch_root}; bzr branch --stacked
bzr+ssh://${local_host}/${repos_root}/${repos_name}"

#this works
ssh ${remote_host} ". .profile; cd ${branch_root}/${repos_name}; bzr
annotate file"

bzr checkout
echo `date` >> file
bzr commit -m "Updated file"

ssh ${remote_host} ". .profile; cd ${branch_root}/${repos_name}; bzr pull"

#this fails <---------------------------------
ssh ${remote_host} ". .profile; cd ${branch_root}/${repos_name}; bzr
annotate file"

#cleanup

cd ..
rm -rf ${repos_root}/${repos_name}
ssh mscvs01 ". .profile; rm -rf ${branch_root}/${repos_name}"