Merge lp:~jelmer/brz/overwrite-old-sha into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/overwrite-old-sha
Merge into: lp:brz/3.1
Diff against target: 13 lines (+1/-1)
1 file modified
breezy/git/remote.py (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/overwrite-old-sha
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+399388@code.launchpad.net

Commit message

Also refresh old_sha1 when overwriting.

Description of the change

Also refresh old_sha1 when overwriting.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/remote.py'
2--- breezy/git/remote.py 2020-08-01 21:49:02 +0000
3+++ breezy/git/remote.py 2021-03-09 21:13:59 +0000
4@@ -640,8 +640,8 @@
5 except errors.NoSuchRevision:
6 raise errors.NoRoundtrippingSupport(
7 source, self.open_branch(name=name, nascent_ok=True))
8+ old_sha = remote_refs.get(actual_refname)
9 if not overwrite:
10- old_sha = remote_refs.get(actual_refname)
11 if remote_divergence(old_sha, new_sha, source_store):
12 raise DivergedBranches(
13 source, self.open_branch(name, nascent_ok=True))

Subscribers

People subscribed via source and target branches