Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3946410
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:07:48+00:00 2026-05-20T01:07:48+00:00

Feels like with the popularity of continuous integration this one should be a piece

  • 0

Feels like with the popularity of continuous integration this one should be a piece of cake but I am stumped. I am setting up TeamCity with HG. I want to be able to push changesets up to a repository that TeamCity watches and runs builds on changes. That’s easy.

Next, if a build passes, I want that changeset to be pulled into a “clean” repository… one that contains only passing changesets. Should be easy but…

TeamCity 6 supports multiple build steps and if any step fails, the rest don’t run. My thought was to put a build step at the end that does a pull (or optionally a push?) to get the passing changeset into the clean repository.

I am trying to use PsExec to run hg on the box with the repositories.

If I try to run just a plain ‘hg pull’ it can’t find the hg.exe even though it is set in the path and I have used the -w flag.

I have tried putting a .bat file in the clean repository that takes a revision parameter and it works fine… locally. When I try to run the .bat file remotely (using PsExec) it runs everything fine but it tries to run it on the build agent. Even if I set the -w argument it runs the .bat file there but tries to run the contents on the build agent box.

Am I just WAY off in my approach? Seems like this is a pretty obvious thing to do so either my Google skills are waning or no one thinks this is worthy of writing about. Either way, I am stuck in SVN land trying to get out so I would appreciate some help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:07:48+00:00Added an answer on May 20, 2026 at 1:07 am

    Add the following lines to your powershell profile:

    function hg {
        cmd /c hg.exe $args
    }
    

    If it doesn’t recognize hg.exe, you may need to add it to your Path:

    $env:Path = $env:Path + ";C:\Program Files\TortoisHG\";
    

    (You can just type notepad $profile into the command prompt. it will open the file for you to edit in Notepad. Copy&paste this line and then save, exit.)

    (see PowerShell alias syntax for running a cmd.exe builtin function?)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This feels like it should be an easy one, but I'm having trouble cleaning
This feels like it should be pretty simple, but not much seems to be
This feels like a silly question but I'm stumped. I working on an iOS
This feels like it should have a basic solution but I don't seem to
It feels like this should be fairly simple but nothing i've tried so far
This is a stupid question, it feels like one. But mental block is bad
This feels like it should be really easy, but I just can't get it
I want to avoid locking on read if possible. But this feels like double-checked
OK, this feels like a question that should be easy to answer, but as
It feels like there must be some semi-simple solution to this, but I just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.