dpush ends up in a broken state if it encounters a network problem
Bug #673884 reported by
Glyph Lefkowitz
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Won't Fix
|
High
|
Jelmer Vernooij |
Bug Description
Let's say I have an SVN branch 'x', and I make a bzr branch of it, 'y'.
I commit 10 revisions to 'y'.
Then I want to get them into SVN, so I do 'bzr dpush'. 5 of the new revisions are successfully pushed. Then I unplug my network cable, and bzr exits with an error.
'y' hasn't been modified; it still thinks it has 10 new revisions that aren't present in SVN.
When I had this problem, I was able to roughly fix it by making a new branch, z, and cherry-picking revisions 6-10 from y into it, then dpushing from z to x. This still lost some history, though, so it would be nice if dpush could keep track of what it was doing.
Related branches
lp:~jelmer/brz/remove-dpush
- Jelmer Vernooij: Approve
-
Diff: 352 lines (+0/-308)5 files modifiedbreezy/builtins.py (+0/-1)
breezy/foreign.py (+0/-107)
breezy/tests/blackbox/__init__.py (+0/-1)
breezy/tests/blackbox/test_dpush.py (+0/-175)
breezy/tests/test_foreign.py (+0/-24)
tags: | added: foreign |
tags: | added: dpush |
tags: | added: affects-twisted |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Jelmer Vernooij (jelmer) |
To post a comment you must log in.
This seems fairly serious. Generally our network operations are nicely atomic and at worst just leave a broken lock, so it'd be good to make sure dpush is equally robust.
Off the top of my head dpush should be updating the local branch tip every time it commits a change to the remote branch. That would still leave a race if instead of a network outage the local system crashed or lost power at the wrong moment. In those cases it would be nice if dpush could automatically detect where it had gotten up to and resume smoothly, but that may be hard to do.