Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-7618]
get workspace path for changed files saved and loaded properly
  • Loading branch information
Rob Petti committed Jun 22, 2011
1 parent 609b74b commit 0216bfc
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -109,6 +109,11 @@ public static PerforceChangeLogSet parse(AbstractBuild build, InputStream change
for (Node fnode : fileNodes) {
Changelist.FileEntry file = new Changelist.FileEntry();
file.setFilename(fnode.selectSingleNode("name").getStringValue());
try{
file.setWorkspacePath(fnode.selectSingleNode("workspacePath").getStringValue());
}catch(Exception e){
//This field might not exist yet, so ignore it.
}
file.setRevision(fnode.selectSingleNode("rev").getStringValue());
file.setAction(Changelist.FileEntry.Action.valueOf(fnode.selectSingleNode("action")
.getStringValue()));
Expand Down Expand Up @@ -165,6 +170,7 @@ public static void saveToChangeLog(OutputStream outputStream, List<Changelist> c
for (Changelist.FileEntry entry : change.getFiles()) {
stream.println("\t\t\t<file>");
stream.println("\t\t\t\t<name>" + Util.xmlEscape(entry.getFilename()) + "</name>");
stream.println("\t\t\t\t<workspacePath>" + Util.xmlEscape(entry.getWorkspacePath()) + "</workspacePath>");
stream.println("\t\t\t\t<rev>" + Util.xmlEscape(entry.getRevision()) + "</rev>");
stream.println("\t\t\t\t<action>" + entry.getAction() + "</action>");
stream.println("\t\t\t</file>");
Expand Down

0 comments on commit 0216bfc

Please sign in to comment.