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:
Shawn O. Pearce
2009-01-16 19:14:32 -08:00
parent 606f04fdf7
commit 682fef6a8b

View File

@@ -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()) {