[MERGE] Raise NoSuchRevision from fetch, instead of InstallFailed

Jonathan Lange jml at mumak.net
Fri May 1 07:48:08 BST 2009


This patch is in response to Andrew's comment, found at:
https://bugs.edge.launchpad.net/launchpad-code/+bug/310347/comments/4

I was going to just tweak InterPackRepo.fetch to let the
NoSuchRevision bubble up. However I did some grepping (see other
recent mails to this list) and found that InstallFailed was only used
in one other place -- bzrlib.fetch.RepoFetcher._revids_to_fetch -- and
it was used in exactly the same way. I changed that to let the
NoSuchRevision error bubble up, then I deleted InstallFailed.

This is something of a bold patch, given that I'm deleting an
exception and I haven't troubled to understand the fetch code at all.
Am happy to tweak.

Also, I couldn't find any tests that exercised the path where
bzrlib.fetch.RepoFetcher._revids_to_fetch raised an InstallFailed.
Given that I don't understand the code (and I want to keep this
simple) I haven't written any. I mention it in case it's a potential
source of bugs.

cheers,
jml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: such-a-shame.patch
Type: text/x-diff
Size: 8877 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090501/e5e57f0d/attachment-0001.bin 


More information about the bazaar mailing list