Mercurial > hg > mercurial
changeset 156:7e36394a9c00
Implement new methods from BranchSupport
author | Dmitry Neverov <dmitry.neverov@jetbrains.com> |
---|---|
date | Tue, 11 Jan 2011 20:05:22 +0300 |
parents | b71e3e8fc990 |
children | 43f4c91d5eaa |
files | mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java |
diffstat | 1 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Tue Jan 11 16:49:19 2011 +0300 +++ b/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Tue Jan 11 20:05:22 2011 +0300 @@ -410,6 +410,30 @@ return this; } + @NotNull + public String getRemoteRunOnBranchPattern() { + return "remote-run/{teamcity.user}/.+"; + } + + @NotNull + public Map<String, String> getBranchesRevisions(@NotNull VcsRoot root) throws VcsException { + syncClonedRepository(root); + Settings settings = createSettings(root); + BranchesCommand branches = new BranchesCommand(settings); + Map<String, String> result = new HashMap<String, String>(); + for (Map.Entry<String, ChangeSet> entry : branches.execute().entrySet()) { + result.put(entry.getKey(), entry.getValue().getId()); + } + return result; + } + + @NotNull + public Map<String, String> getBranchRootOptions(@NotNull VcsRoot root, @NotNull String branchName) { + final Map<String, String> options = new HashMap<String, String>(root.getProperties()); + options.put(Constants.BRANCH_NAME_PROP, branchName); + return options; + } + public List<ModificationData> collectChanges(@NotNull VcsRoot fromRoot, @NotNull String fromRootRevision, @NotNull VcsRoot toRoot, @Nullable String toRootRevision, @NotNull CheckoutRules checkoutRules) throws VcsException {