cannot push -r <less than head> --overwrite

Bug #386576 reported by Robert Collins
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Jelmer Vernooij

Bug Description

push -r X --overwrite, where X is less than tip: fails with 'no new
revisions to push'.

 affects bzr
 importance high
 status confirmed

This is a regression.

--

Related branches

Revision history for this message
John A Meinel (jameinel) wrote :

I tracked it down to this function:
    def _basic_push(self, target, overwrite, stop_revision):
        """Basic implementation of push without bound branches or hooks.

        Must be called with source read locked and target write locked.
        """
        result = BranchPushResult()
        result.source_branch = self
        result.target_branch = target
        result.old_revno, result.old_revid = target.last_revision_info()
        self.update_references(target)
        if result.old_revid != self.last_revision():
            # We assume that during 'push' this repository is closer than
            # the target.
            graph = self.repository.get_graph(target.repository)
            target.update_revisions(self, stop_revision,
                overwrite=overwrite, graph=graph)

I believe the change should be:
        if result.old_revid != self.last_revision():
should become
        if result.old_revid != stop_revision:

But we would need tests, etc to confirm.

I can at least confirm in my real-world test case that the change "fixes" this bug. I haven't determined the fallout yet.

Jelmer Vernooij (jelmer)
Changed in bzr:
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr:
status: Confirmed → In Progress
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr:
status: Fix Committed → Fix Released
milestone: none → 2.4.0
milestone: 2.4.0 → 2.4b1
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.