# HG changeset patch # User Dmitry Neverov # Date 1294765522 -10800 # Node ID 7e36394a9c009d3bb17dd0099c9a05bd01f66ffc # Parent b71e3e8fc990b9c35161390ab7d3e97cdccc339b Implement new methods from BranchSupport diff -r b71e3e8fc990 -r 7e36394a9c00 mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java --- 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 getBranchesRevisions(@NotNull VcsRoot root) throws VcsException { + syncClonedRepository(root); + Settings settings = createSettings(root); + BranchesCommand branches = new BranchesCommand(settings); + Map result = new HashMap(); + for (Map.Entry entry : branches.execute().entrySet()) { + result.put(entry.getKey(), entry.getValue().getId()); + } + return result; + } + + @NotNull + public Map getBranchRootOptions(@NotNull VcsRoot root, @NotNull String branchName) { + final Map options = new HashMap(root.getProperties()); + options.put(Constants.BRANCH_NAME_PROP, branchName); + return options; + } + public List collectChanges(@NotNull VcsRoot fromRoot, @NotNull String fromRootRevision, @NotNull VcsRoot toRoot, @Nullable String toRootRevision, @NotNull CheckoutRules checkoutRules) throws VcsException {