Can you update one project from another using Mercurial

I will try to explain my situation as brief as possible:

I have a template project that I use as a template (duh) when starting a new project. This template project develops, and sometimes I update it when I work on another project.

So imagine that:

  • Template Project: template.file
  • Project A: template.file and projectA.file
  • Project B: template.file and projectB.file

(all projects are under editorial control) Now that I change template.file in project A, I would like all other template.files in all other projects to be updated

I'm on windows using tortoisehg and I'm relatively new to this versioned game. I suppose I would do this with branches? But will the project project.file and ProjectB.file also be added to the template project?

+3
source share
2 answers

Here is what you can do:

Go to the template project and merge project A, then crop everything you don't need before committing. This is quite time consuming and time consuming.

Then you can go to the project and pull out the template from the project and merge it very carefully.

I would not do this for a number of reasons. Firstly, it is random and error prone. Secondly, this leads to both projects containing all the files of all other projects, even if in the prompt versions these files are considered deleted. The story is still there.


Here is another thing you could do:

hg export, , A. hg import, .

A B .

, A .

, .


, :

. A B .

+2

Mercurial , , .

:

  • , .
  • , , Project A Project B
  • , , /

3 , .

3 template.file, , Mercurial , .

, , .

, A/B, .

A, , , A, , , .

.

+1

All Articles