Introduce id property on REST entities

The /changes/ entities now use "id" to include a triplet of the
project, branch and change-id string to uniquely identify that
change on the server. This moves the old id field to be named
change_id, which is a breaking change.

Change-Id: I76671c9f67cb853cae817ab132a5884d89bbc480
This commit is contained in:
Shawn O. Pearce
2012-11-12 12:07:00 -08:00
committed by Gerrit Code Review
parent bbeb2a96e4
commit 959f96e0a0
3 changed files with 35 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ public class ChangeInfo extends JavaScriptObject {
}
public final String id_abbreviated() {
return new Change.Key(id()).abbreviate();
return new Change.Key(change_id()).abbreviate();
}
public final Change.Status status() {
@@ -61,10 +61,11 @@ public class ChangeInfo extends JavaScriptObject {
return Natives.keys(labels0());
}
public final native String id() /*-{ return this.id; }-*/;
public final native String project() /*-{ return this.project; }-*/;
public final native String branch() /*-{ return this.branch; }-*/;
public final native String topic() /*-{ return this.topic; }-*/;
public final native String id() /*-{ return this.id; }-*/;
public final native String change_id() /*-{ return this.change_id; }-*/;
private final native String statusRaw() /*-{ return this.status; }-*/;
public final native String subject() /*-{ return this.subject; }-*/;
public final native AccountInfo owner() /*-{ return this.owner; }-*/;