Merge "Make refs/draft-comments/ consistent with refs/starred-changes/"

This commit is contained in:
Edwin Kempin
2015-12-03 12:02:22 +00:00
committed by Gerrit Code Review
3 changed files with 5 additions and 20 deletions

View File

@@ -92,28 +92,13 @@ public class RefNames {
public static String refsDraftComments(Account.Id accountId,
Change.Id changeId) {
StringBuilder r = buildRefsDraftCommentsPrefix(accountId);
StringBuilder r = buildRefsPrefix(REFS_DRAFT_COMMENTS, accountId);
r.append(changeId.get());
return r.toString();
}
public static String refsDraftCommentsPrefix(Account.Id accountId) {
return buildRefsDraftCommentsPrefix(accountId).toString();
}
public static StringBuilder buildRefsDraftCommentsPrefix(
Account.Id accountId) {
StringBuilder r = new StringBuilder();
r.append(REFS_DRAFT_COMMENTS);
int n = accountId.get() % 100;
if (n < 10) {
r.append('0');
}
r.append(n);
r.append('/');
r.append(accountId.get());
r.append('-');
return r;
return buildRefsPrefix(REFS_DRAFT_COMMENTS, accountId).toString();
}
public static String refsStarredChanges(Account.Id accountId,