Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  Avoid browser caching for diff on edit patch
  MergeValidationListener: Include the change Id in onPreMerge
  Upgrade jackson-core to 2.10.1

Change-Id: I1eb449cda2fa0d95029271f29a7b5c0e161edb97
This commit is contained in:
David Pursehouse
2019-11-12 13:36:34 -08:00
6 changed files with 25 additions and 9 deletions

View File

@@ -2280,15 +2280,23 @@
params.base = basePatchNum;
}
const endpoint = `/files/${encodeURIComponent(path)}/diff`;
return this._getChangeURLAndFetch({
const req = {
changeNum,
endpoint,
patchNum,
errFn: opt_errFn,
params,
anonymizedEndpoint: '/files/*/diff',
});
};
// Invalidate the cache if its edit patch to make sure we always get latest.
if (patchNum === this.EDIT_NAME) {
if (!req.fetchOptions) req.fetchOptions = {};
if (!req.fetchOptions.headers) req.fetchOptions.headers = new Headers();
req.fetchOptions.headers.append('Cache-Control', 'no-cache');
}
return this._getChangeURLAndFetch(req);
},
/**