Use abbreviated Change-Id in merge messages
Instead of recording the internal database sequence number, record the abbreviation we show in the UI, and that we want users to use for searching in the future as try to move to a distributed database. Change-Id: I2174616287e6404f2c115ac5c64c327f24f0a343 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -442,9 +442,8 @@ public class MergeOp {
|
||||
final StringBuilder msgbuf = new StringBuilder();
|
||||
if (merged.size() == 1) {
|
||||
final CodeReviewCommit c = merged.get(0);
|
||||
final Change.Id changeId = c.patchsetId.getParentKey();
|
||||
msgbuf.append("Merge change ");
|
||||
msgbuf.append(changeId);
|
||||
msgbuf.append(c.changeKey.abbreviate());
|
||||
} else {
|
||||
final ArrayList<CodeReviewCommit> o;
|
||||
o = new ArrayList<CodeReviewCommit>(merged);
|
||||
@@ -458,8 +457,7 @@ public class MergeOp {
|
||||
|
||||
msgbuf.append("Merge changes ");
|
||||
for (final Iterator<CodeReviewCommit> i = o.iterator(); i.hasNext();) {
|
||||
final Change.Id id = i.next().patchsetId.getParentKey();
|
||||
msgbuf.append(id);
|
||||
msgbuf.append(i.next().changeKey.abbreviate());
|
||||
if (i.hasNext()) {
|
||||
msgbuf.append(',');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user