[MERGE][0.8] fix fetch to raise RevisionNotPresent if a file version is not present.

Robert Collins robertc at robertcollins.net
Thu May 4 00:08:56 BST 2006

On Wed, 2006-05-03 at 23:14 +1000, Martin Pool wrote:

> Is it the revision_ids that altered it, or is it the new versions  
> that were introduced?  (They can differ when e.g. a merge brings in a  
> newly added file.)

They cant differ :). There only two cases for a file id in an inventory:
either the revision field is carried over from a separate revision, in
which case that revision is brought in by the fetch as well. Or its
altered in this inventory and thus it has the value of this revision. To
carry a revision value over and not the revision we depend upon requires
a faulty revision graph, or a differing inventory. The former we correct
after pull, and in fact our code wont construct a faulty one with this
problematic property, becausee to reference the revision as being a
parent, the commit code needs the same revision graph to be more
accurate than the pull graph. The later is a problem anyway : I dont
think its worth exacerbating the performance here to deal with that. It
will need a smart tool like 'reconcile OTHER BRANCH' anyway.

> Actually I'm not quite sure this code handles this case properly -  
> you filter it so that it returns only revisions matching the  
> revision_ids parameter, but that test may be a bit weak to make sure  
> we really pull all required versions.

See above :). This is a utility function used by fetch, but fetch itself
always grabs the transitive closure of revisions, which much include the
revisions mentioned in the inventory.

> So, merge if you're sure this is actually handled properly, otherwise  
> let's try to fix it.

I am, and certainly its no worse than the code today, so I'm merging it.
But we can revisit later if desired.

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/20060504/82d70fc7/attachment.pgp 

More information about the bazaar mailing list