Mercurial > hg > mercurial
diff mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java @ 44:1490e2981799
labeling/tagging support
author | Pavel.Sher |
---|---|
date | Fri, 05 Sep 2008 01:15:29 +0400 |
parents | 798e750e4f26 |
children | 4059fcc5473e |
line wrap: on
line diff
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java Fri Aug 22 20:21:48 2008 +0400 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/Settings.java Fri Sep 05 01:15:29 2008 +0400 @@ -20,6 +20,7 @@ import jetbrains.buildServer.vcs.VcsRoot; import jetbrains.buildServer.util.Hash; import jetbrains.buildServer.util.FileUtil; +import jetbrains.buildServer.util.StringUtil; import org.jetbrains.annotations.NotNull; import java.io.File; @@ -32,11 +33,13 @@ private String myHgCommandPath; private File myWorkingDir; private File myWorkFolderParentDir; + private String myPushUrl; public Settings(@NotNull File workFolderParentDir, @NotNull VcsRoot vcsRoot) { myWorkFolderParentDir = workFolderParentDir; setRepository(vcsRoot.getProperty(Constants.REPOSITORY_PROP)); setHgCommandPath(vcsRoot.getProperty(Constants.HG_COMMAND_PATH_PROP)); + myPushUrl = vcsRoot.getProperty(Constants.PUSH_URL); } public Settings() { @@ -64,6 +67,14 @@ return myHgCommandPath; } + /** + * Returns URL to use for push command if it was specified or repository path otherwise + * @return URL to use for push command if it was specified or repository path otherwise + */ + public String getPushUrl() { + return StringUtil.isEmpty(myPushUrl) ? getRepository() : myPushUrl; + } + public void setHgCommandPath(@NotNull final String hgCommandPath) { myHgCommandPath = hgCommandPath; }