[BUG][PATCH] fileid_involved fails to unescape xml characters
John Arbash Meinel
john at arbash-meinel.com
Fri Jan 20 04:47:23 GMT 2006
Martin Pool wrote:
> On 19 Jan 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
>
>
>>Do you have a specific timeline for releasing 0.7rc3? The
>>fileid_involved bug basically breaks everyone who uses an arch->bzr
>>conversion, since directories generally got a tag which was:
>> User <email> Timestamp
>>Which means there are lots of <> characters in Arch ids.
>
>
> I'll make one it in the next 2 hours.
>
> For people who've suffered this I think it will be enough to just remove
> the files from inside revision-store describing newly pulled in
> revisions whose content didn't come across. The problem here is this
> code introduced in Goffredo's patch:
>
> revs = self._revids_to_fetch(last_revision )
> # nothing to do
> if revs:
> self._fetch_revision_texts( revs )
> self._fetch_weave_texts( revs )
> self._fetch_inventory_weave( revs )
> self.count_copied += len(revs)
>
> It breaks an invariant to pull the revision texts into the store before
> their content has come in: if the transfer is interrupted then the
> revisions will be half-present, which is not allowed.
>
> It would perhaps be nice to be able to fetch them into an in-memory
> isolated transaction and write them out afterwards but that's not what
> happens at the moment.
>
> (We should perhaps add a test with a transport that interrupts after a
> certain number of requests to exercise handling of flaky connections.)
>
Wouldn't it work to just change the order to:
revs = self._revids_to_fetch(last_revision )
# nothing to do
if revs:
self._fetch_weave_texts( revs )
self._fetch_inventory_weave( revs )
self._fetch_revision_texts( revs )
self.count_copied += len(revs)
It seems like that would not violate the invariant.
I'm also wondering how we missed that.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060119/67aa97ae/attachment.pgp
More information about the bazaar
mailing list