cannot push -r <less than head> --overwrite
Bug #386576 reported by
Robert Collins
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
lp:~jelmer/bzr/push-overwrite-old-rev
- Vincent Ladeuil: Approve
-
Diff: 51 lines (+19/-1)3 files modifiedbzrlib/branch.py (+1/-1)
bzrlib/tests/per_branch/test_push.py (+15/-0)
doc/en/release-notes/bzr-2.4.txt (+3/-0)
Changed in bzr: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in bzr: | |
status: | Confirmed → In Progress |
Changed in bzr: | |
status: | In Progress → Fix Committed |
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.
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. source_ branch = self
result. target_ branch = target
result. old_revno, result.old_revid = target. last_revision_ info()
self.update_ references( target) revision( ): .get_graph( target. repository)
target. update_ revisions( self, stop_revision,
overwrite= overwrite, graph=graph)
"""
result = BranchPushResult()
if result.old_revid != self.last_
# We assume that during 'push' this repository is closer than
# the target.
graph = self.repository
I believe the change should be: revision( ):
if result.old_revid != self.last_
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.