in src/org/jetbrains/tfsIntegration/ui/SelectRevisionForm.java [229:257]
private WorkspaceVersionSpec parseWorkspaceVersionSpec(final String versionSpec) {
if (versionSpec == null || versionSpec.length() == 0 || versionSpec.charAt(0) == ';') {
return null;
}
int semicolonIndex = versionSpec.indexOf(';');
String workspaceName = semicolonIndex < 0 ? versionSpec : versionSpec.substring(0, semicolonIndex);
if (!WorkspaceInfo.isValidName(workspaceName)) {
return null;
}
String ownerName = semicolonIndex < 0 || semicolonIndex == versionSpec.length() - 1
? TfsUtil.getNameWithoutDomain(myWorkspace.getOwnerName())
: versionSpec.substring(semicolonIndex + 1);
// remove spaces from the end
int newLength = ownerName.length();
while (newLength > 0 && ownerName.charAt(newLength - 1) == ' ') {
newLength--;
}
if (newLength == 0) {
ownerName = TfsUtil.getNameWithoutDomain(myWorkspace.getOwnerName());
}
else if (newLength < ownerName.length()) {
ownerName = ownerName.substring(0, newLength);
}
return new WorkspaceVersionSpec(workspaceName, ownerName);
}