RemoteRepository.get_rev_id_for_revno fails on empty stacked repository

Bug #785116 reported by Andrew Bennetts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

It's common to have a stacked repository that is completely empty (e.g. if pushing a stacked branch whose tip rev is already in the stacked-on repository). In this case RemoteRepository.get_rev_id_for_revno fails because the 'Repository.get_rev_id_for_revno' HPSS call returns a “nosuchrevision” error rather than a “history-incomplete” response.

Probably we should both:
 * Fix the server to reply with history-incomplete in this case (using the known-pair sent by the client)
 * Fix the client to interpret a nosuchrevision error for the revid in the known-pair as history-incomplete.

Fixing both sides means that old clients will start working in this case if the server is upgraded to a fixed version, and vice-versa.

This causes strangeness like breaking "bzr log -rN" and "bzr uncommit -r …" against stacked branches with empty repos hosted on a smart server.

A workaround is to avoid the smart calls, e.g. use SFTP or add the nosmart+ URL prefix

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.