-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the "current" large repo version when forward syncing
Summary: This diff gets us to whole purpose of this stack. Before when we were forward-syncing a commit from small to large we always looked at the version used for syncing the parent commit from small and used the same one. This caused 2 problems: * if the config version in the large repo changed since then we'd always fail and manual intervention would be needed to recover us from that situation. There are two things we're doing wrong that are causing this error: * we are using wrong version - if the master is using a newer sync mapping version that's the one that's "current" and should be used * we are rewriting on top of the wrong parent: the commit that parent remaps to is one of many commits in large repo that are "working copy equivalent" to it, in fact every commit in the common branch since last sync is "equivalent" but only the ones coming after the version change are sound candidates for parent if we want to sync with new version * if the last sync was a while ago - let's say we didn't have a push to small since a week such push could be rejected as we have a maximum pushrebase distance we don't pushrebase over. This diff fixes both by rewriting the synced small commit parent to the latest version of large repo target bookmark and uses a version associated with it. It does so only if that commit has a version associated with it and is newer than the commit the small repo commit parent remaps to. NOTE: For now to minimize blast radius of this diff we artificially limit its application to the first bulletpoint Reviewed By: markbt, gustavoavena Differential Revision: D54877757 fbshipit-source-id: ea69204449e1fc5e14fda8b1ee8a6270c2fd2c9a
- Loading branch information
1 parent
a251ee0
commit 70865ba
Showing
7 changed files
with
198 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.