Fix initial change upload over SSH by ensuring sortKey is set
We have to call ChangeUtil.update() prior to inserting a change into the data store, otherwise the required changeKey field isn't populated and it won't be visible in search queries. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -472,6 +472,7 @@ class Receive extends AbstractGitCommand {
|
||||
imp.setTransaction(txn);
|
||||
imp.run();
|
||||
change.setCurrentPatchSet(imp.getPatchSetInfo());
|
||||
ChangeUtil.updated(change);
|
||||
db.changes().insert(Collections.singleton(change));
|
||||
|
||||
for (final ApprovalType t : Common.getGerritConfig().getApprovalTypes()) {
|
||||
|
||||
Reference in New Issue
Block a user