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 8053095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:44:42+00:00 2026-06-05T07:44:42+00:00

Having myself found in a role of a build engineer and a systems guy

  • 0

Having myself found in a role of a build engineer and a systems guy I had to learn end figure out a few things – namely how to set up our infrastructure. Before I came on board they didn’t have any. With this in mind please excuse me if I ask anything that should have been obvious.

We currently have 3 level distributed mercurial repositories: level one on each of developer machines, level two on central (trunk) server – only accessible from local network and the third layer on BitBucket. Workflow is as follows:

  1. Local development: developer pulls change-sets from local network server. developer commits to local and pushes to our local server once merge conflicts are resolved. A scheduled script overnight backs everything up to BitBucket.

  2. Working from home: developer pulls change-sets from BitBucket. Developer comits to their local repo and push to BitBucket.

  3. TeamCity picks up repo changes from local network server for each project and runs a build / automated deploy to test environment.

The issue I’m hitting is scenario 2: at the moment if someone pushes something to bitbucket it’s their responsibility to merge it back when they’re back in office. And it’s a bit of a time waster if it could be automated.

In case you’re wondering, the reason we have a central repo on local network is because it would be slow to run TeamCity builds of BitBucket repositories. Haven’t tested so it’s just an educated guess.

Anyhow, the script that is scheduled and pushes all changes from central repository on local network just runs a “hg push” for each of repositories. It would have to do a pull / merge beforehand. How do I do this right?

This is what the pull would have to use switches for:
– update after pull
– in case of merge conflicts, always take newer file
– in case of error, send an email to system administrator(s)
– anything extra?

Please feel free to share your own setup as long as it’s not vastly different to what’s described.

UPDATE: In light of recent answers I feel an important aspect if the intended approach needs to be clarified. The idea is not to force merges on our local network central repo. Instead it should resolve merge conflicts in same was as per using HgWorkbench on developer machines with post pull: update + merge. All developers have this on by default so it should be OK.

So the script / batch file on server would do the following:

  1. pull from BitBucket
  2. update + auto merge
  3. Any merge auto conflicts?

    3.1 Yes -> Send an email to administrators to manually merge -> Break

    3.2 No -> Cary on

  4. Get outgoing changesets. Will push create multiple heads? (This might be redundant because of pull / update)

    4.1 Yes -> Prompt administrators. Break.

    4.2 No -> Push changes

Hope this clears things up a bit. Now, can this be done using hg commands alone – batch – or do I have to script it? Specifically can it send emails?

Thanks.

  • 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-06-05T07:44:43+00:00Added an answer on June 5, 2026 at 7:44 am

    So all your work is available at BitBucket, right? Why not make BitBucket (as available from anywhere) you primary repo source and dropping your local servers? You can pull changes from BitBucket with TeamCity for your nightly builds and developers whould always work with current repo at BitBucket and resolve all merging problems themselves so there wouldn’t be any subsequent merges for you.

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

Sidebar

Related Questions

I ran a security code analyst i found myself having a CA2105 warning .
I've found myself having a requirement to configure log4net based on a file relative
I have found myself having to turn a chunk of Lua code into a
I found myself having to remove the first line of a string quite often
I've found myself having to write some VBA code recently and just wondered if
I'm working as a client-side developer on a web app and found myself having
Recently, I found myself having to write up some concerns I have about race
I'm currently experimenting with Scala and looking for best practices. I found myself having
I don't know why I never found myself having to use a debugger to
I found myself in the need of having to call a slot directly. I

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.