Skip to content
Permalink
Browse files

[JENKINS-7618]

get workspace path for changed files saved and loaded properly
  • Loading branch information...
Rob Petti
Rob Petti committed Jun 22, 2011
1 parent 609b74b commit 0216bfc4eceb48478890dc85c16255ace485196a
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/main/java/hudson/plugins/perforce/PerforceChangeLogSet.java
@@ -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()));
@@ -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>");

0 comments on commit 0216bfc

Please sign in to comment.
You can’t perform that action at this time.