rest = "";
}
if (rest.isEmpty()) {
Gerrit.display(token, panel== null //
? new ChangeScreen(id) //
: new NotFoundScreen());
return;
}
String psIdStr;
s = rest.indexOf('/');
if (0 <= s) {
psIdStr = rest.substring(0, s);
rest = rest.substring(s + 1);
} else {
psIdStr = rest;
rest = "";
}
PatchSet.Id base;
PatchSet.Id ps;
int dotdot = psIdStr.indexOf("..");
if (1 <= dotdot) {
base = new PatchSet.Id(id, Integer.parseInt(psIdStr.substring(0, dotdot)));
ps = new PatchSet.Id(id, Integer.parseInt(psIdStr.substring(dotdot + 2)));
} else {
base = null;
ps = new PatchSet.Id(id, Integer.parseInt(psIdStr));
}
if (!rest.isEmpty()) {
Patch.Key p = new Patch.Key(ps, rest);
patch(token, base, p, 0, null, null, panel);
} else {
if (panel == null) {
Gerrit.display(token, new ChangeScreen(ps));
} else if ("publish".equals(panel)) {
publish(ps);
} else {
Gerrit.display(token, new NotFoundScreen());
}