public class RefNames extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EDIT_PREFIX |
static String |
HEAD |
static String |
META_SUFFIX
Suffix of a meta ref in the NoteDb.
|
static String |
REFS |
static String |
REFS_CACHE_AUTOMERGE
Prefix applied to merge commit base nodes.
|
static String |
REFS_CHANGES |
static String |
REFS_CONFIG
Configuration settings for a project
refs/meta/config |
static String |
REFS_DASHBOARDS
Configurations of project-specific dashboards (canned search queries).
|
static String |
REFS_DELETED_GROUPS
NoteDb ref for deleted groups
refs/deleted-groups . |
static String |
REFS_DRAFT_COMMENTS
Draft inline comments of a user on a change
|
static String |
REFS_EXTERNAL_IDS
Note tree listing external IDs
|
static String |
REFS_GROUPNAMES
NoteDb ref for the NoteMap of all group names
|
static String |
REFS_GROUPS
NoteDb ref for a group
refs/groups |
static String |
REFS_HEADS |
static String |
REFS_META |
static String |
REFS_REJECT_COMMITS
Note tree listing commits we refuse
refs/meta/reject-commits |
static String |
REFS_SEQUENCES
Sequence counters in NoteDb.
|
static String |
REFS_STARRED_CHANGES
A change starred by a user
|
static String |
REFS_TAGS |
static String |
REFS_USERS
Preference settings for a user
refs/users |
static String |
REFS_USERS_DEFAULT
Default user preference settings
|
static String |
REFS_USERS_SELF
Magic user branch in All-Users
refs/users/self |
static String |
ROBOT_COMMENTS_SUFFIX
Suffix of a ref that stores robot comments in the NoteDb.
|
Modifier and Type | Method and Description |
---|---|
static String |
changeMetaRef(Change.Id id) |
static String |
fullName(String ref) |
static boolean |
isConfigRef(String ref)
Whether the ref is the configuration branch, i.e.
|
static boolean |
isGroupRef(String ref)
Whether the ref is used for storing group data in NoteDb.
|
static boolean |
isNoteDbMetaRef(String ref) |
static boolean |
isRefsDeletedGroups(String ref)
Whether the ref is a group branch that stores NoteDb data of a deleted group.
|
static boolean |
isRefsEdit(String ref) |
static boolean |
isRefsGroups(String ref)
Whether the ref is a group branch that stores NoteDb data of a group.
|
static boolean |
isRefsUsers(String ref) |
static String |
refsCacheAutomerge(String hash) |
static String |
refsDeletedGroups(AccountGroup.UUID groupUuid) |
static String |
refsDraftComments(Change.Id changeId,
Account.Id accountId) |
static String |
refsDraftCommentsPrefix(Change.Id changeId) |
static String |
refsEdit(Account.Id accountId,
Change.Id changeId,
PatchSet.Id psId)
Returns reference for this change edit with sharded user and change number:
refs/users/UU/UUUU/edit-CCCC/P.
|
static String |
refsEditPrefix(Account.Id accountId) |
static String |
refsEditPrefix(Account.Id accountId,
Change.Id changeId)
Returns reference prefix for this change edit with sharded user and change number:
refs/users/UU/UUUU/edit-CCCC/.
|
static String |
refsGroups(AccountGroup.UUID groupUuid) |
static String |
refsStarredChanges(Change.Id changeId,
Account.Id accountId) |
static String |
refsStarredChangesPrefix(Change.Id changeId) |
static String |
refsUsers(Account.Id accountId) |
static String |
robotCommentsRef(Change.Id id) |
static String |
shard(int id) |
static String |
shortName(String ref) |
public static final String HEAD
public static final String REFS
public static final String REFS_HEADS
public static final String REFS_TAGS
public static final String REFS_CHANGES
public static final String REFS_META
public static final String REFS_REJECT_COMMITS
refs/meta/reject-commits
public static final String REFS_CONFIG
refs/meta/config
public static final String REFS_EXTERNAL_IDS
public static final String REFS_USERS_SELF
refs/users/self
public static final String REFS_USERS_DEFAULT
public static final String REFS_DASHBOARDS
public static final String REFS_SEQUENCES
public static final String REFS_CACHE_AUTOMERGE
References in this directory should take the form refs/cache-automerge/xx/yyyy...
where xx is the first two digits of the merge commit's object name, and yyyyy... is the
remaining 38. The reference should point to a treeish that is the automatic merge result of the
merge commit's parents.
public static final String META_SUFFIX
public static final String ROBOT_COMMENTS_SUFFIX
public static final String EDIT_PREFIX
public static final String REFS_USERS
refs/users
public static final String REFS_GROUPS
refs/groups
public static final String REFS_GROUPNAMES
public static final String REFS_DELETED_GROUPS
refs/deleted-groups
. This ref namespace is foreseen as an
attic for deleted groups (it's reserved but not used yet)public static final String REFS_DRAFT_COMMENTS
public static final String REFS_STARRED_CHANGES
public static boolean isNoteDbMetaRef(String ref)
public static String refsGroups(AccountGroup.UUID groupUuid)
public static String refsDeletedGroups(AccountGroup.UUID groupUuid)
public static String refsUsers(Account.Id accountId)
public static String refsDraftComments(Change.Id changeId, Account.Id accountId)
public static String refsStarredChanges(Change.Id changeId, Account.Id accountId)
public static String shard(int id)
public static String refsEdit(Account.Id accountId, Change.Id changeId, PatchSet.Id psId)
accountId
- account idchangeId
- change numberpsId
- patch set numberpublic static String refsEditPrefix(Account.Id accountId, Change.Id changeId)
accountId
- account idchangeId
- change numberpublic static String refsEditPrefix(Account.Id accountId)
public static boolean isRefsEdit(String ref)
public static boolean isRefsUsers(String ref)
public static boolean isRefsGroups(String ref)
true
for
all refs that start with refs/groups/
.public static boolean isRefsDeletedGroups(String ref)
true
for all refs that start with refs/deleted-groups/
.public static boolean isGroupRef(String ref)
true
for all group
branches, refs/meta/group-names and deleted group branches.public static boolean isConfigRef(String ref)
refs/meta/config
, for a project.