Created
August 30, 2010 19:46
-
-
Save chriswk/557933 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Map getTagHeadDifferences() | |
throws IOException, ScmException { | |
if (log.isDebugEnabled()) { | |
log.debug("Get a list differences between latest tag and head"); | |
} | |
String tag1 = getLatestLiveTag(); | |
StringBuffer taga = new StringBuffer(); | |
StringBuffer tagb = new StringBuffer(); | |
StringBuffer tagc = new StringBuffer(); | |
if (MAINBOOK.equals(type)) { | |
taga.append(getValue("svn.document.root")); | |
taga.append(getValue("svn.tags.path")); | |
tagb.append(getValue("svn.document.root")); | |
tagb.append(getValue("svn.trunk.path")); | |
tagc.append(getValue("svn.working.root")); | |
tagc.append(getValue("svn.working.tag.path")); | |
} else if (PASIENT.equals(type)) { | |
taga.append(getValue("svn.document.root")); | |
taga.append(getValue("svn.tags.pasient.path")); | |
tagb.append(getValue("svn.document.root")); | |
tagb.append(getValue("svn.trunk.pasient.path")); | |
tagc.append(getValue("svn.working.pasient.root")); | |
tagc.append(getValue("svn.working.tag.pasient.path")); | |
} else if (VETERINAR.equals(type)) { | |
taga.append(getValue("svn.document.root")); | |
taga.append(getValue("svn.tags.vet.path")); | |
tagb.append(getValue("svn.document.root")); | |
tagb.append(getValue("svn.trunk.vet.path")); | |
tagc.append(getValue("svn.working.vet.root")); | |
tagc.append(getValue("svn.working.tag.vet.path")); | |
} else { | |
throw new ScmException("Type " + type + " unknown"); | |
} | |
taga.append("/").append(tag1).append("web/content"); | |
tagb.append("/web/content"); | |
tagc.append("/").append(tag1).append("web/content"); | |
String[] command = new String[]{"svn", | |
"merge", | |
"--dry-run", | |
taga.toString(), | |
tagb.toString(), | |
tagc.toString()}; | |
return processDiff(run(command)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Map getTagHeadDifferences() throws IOException, ScmException { | |
if(log.isDebugEnabled()) { | |
log.debug("Get a list of differences between latest tag and head."); | |
} | |
String latestTag = getLatestLiveTag(); | |
String[] command = new String[] { | |
"git", | |
"diff", | |
"--name-status", | |
latestTag, | |
GIT_HEAD, | |
"web/content" | |
}; | |
return processDiff(run(command)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment