Wednesday, 15 February 2012

Should I have to merge and commit every time I update my Mercurial branch on the production server? -


I am using Mercurial in a recent project. I am deploying this project on the web server where I have a slightly different config file with the output settings. The problem is that when I do pull and update There is also often merge and commit .

Is this the correct workflow? It seems odd that in order to be able to continue the update, I have to complete the changes, I felt that a merge integrates them into my production branch and every time I update it. Is this a distributed version control paradigm that I'm not using yet?

It was handled in a way, but I think your question is better that a bit more There is clarity.

In short: Yes, this is normal. Here's a part of expanse:

You start with this in the main repository (where the box changes):

  Main: - [E] - [F] - [g]  

Then you clone the production server and add a change, h, which is the deployment Optimizes. So the deployment repo looks like this:

  Product: - [e] - [f] - [g] - [h]  

and then the main There is more work on the repo, adding changes, I and J, are seen as main repos:

-
- [e] - [f] - [g] - [i ] - [J]

When it is drawn into production it looks like this:

  Product: - [E] - [F] - [G ] - [ii] - [ja] \ \ - [h]  

with two heads, which you meet:

  Product: - [ E] - [F] - [H] ] - [ii] - [ja] \ \ - [h] ----- [k]  

Where's just J plus, the changes you made in H .

Now more work is done in the main, give:

  main: - [e] - [f] - [g] - [ii] - [j] - [L] - [M]  

To give output to you:

  Production: - [E] - [F] - [g] - [ii] - [ja] - [l] - [m] \ \ - [h] ----- [k]  

And then you merge and get:

  Production: - [e] - [f] - [g] - [ii] - [ja] - [l] - [m] \ \ - [h] --- - [K] ------- [n]  

So every time you bring changes from the main, you are doing a merge, and a new change ( This b NAR N).

I think this is fine, and this is "normal".

You can avoid it by answering some of the questions associated with the above questions. And A new trick is you parents (and material) of the original H. Can be used to keep modify so that it can always be taken to the end of the new tip.

This is a trick and it will generate linear history on production (although you are still doing this which is essentially a merge to get it). I am not a fan because I do not like to change the changes after being committed, but since H never leaves the production box.

There were other answers and (as host: Header).


No comments:

Post a Comment