Clarify the failing change in MergeabilityChecker

If an update check fails, it may be change specific. Record the
change as part of the logged message.

Change-Id: I33aba050572f919e150d8e0f1bd678f575301b72
This commit is contained in:
Shawn Pearce
2014-08-26 15:00:50 -07:00
parent a7ef14229d
commit 7a4cdcd5f8

View File

@@ -350,10 +350,10 @@ public class MergeabilityChecker implements GitReferenceUpdatedListener {
// change is closed
return false;
} catch (Exception e) {
String msg = "Failed to update mergeability flags for project "
+ change.getDest().getParentKey() + " on update of "
+ change.getDest().get();
log.error(msg, e);
log.error(String.format(
"cannot update mergeability flag of change %d in project %s after update of %s",
change.getId().get(),
change.getDest().getParentKey(), change.getDest().get()), e);
throw e;
} finally {
tl.setContext(old);