Make edit's parent the base of the change

Change-Id: I53186d485638e9c761720630149e575a461f2001
This commit is contained in:
David Ostrovsky
2014-09-11 13:33:45 +02:00
parent 0f8fcab555
commit 0619f65b17
9 changed files with 99 additions and 104 deletions

View File

@@ -29,8 +29,9 @@ import org.eclipse.jgit.revwalk.RevCommit;
* A single user's edit for a change.
* <p>
* There is max. one edit per user per change. Edits are stored on refs:
* refs/users/UU/UUUU/edit-CCCC where UU/UUUU is sharded representation
* of user account and CCCC is change number.
* refs/users/UU/UUUU/edit-CCCC/P where UU/UUUU is sharded representation
* of user account, CCCC is change number and P is the patch set number it
* is based on.
*/
public class ChangeEdit {
private final IdentifiedUser user;
@@ -70,7 +71,8 @@ public class ChangeEdit {
}
public String getRefName() {
return ChangeEditUtil.editRefName(user.getAccountId(), change.getId());
return ChangeEditUtil.editRefName(user.getAccountId(), change.getId(),
basePatchSet.getId());
}
public RevCommit getEditCommit() {