SVN supports historical mergers, so is Mercurial better?

Possible duplicate:
Merge: hg / git vs svn

Hi,

I have been an SVN user for a long time and have heard a lot of br-ha-ha with respect to mercury-based and decentralized version control systems in general. The main common feature that I know of is that merging in Mercurial is much simpler because it records information for each merge, so every subsequent merge is known about the previous ones.

Now, as pointed out in the red book , in the merging section, SVN already supports this with mergeinfo. Now I have not actually used this function (although I wanted, our version of the repo was not recent enough), but is this feature of SVN especially different from what Mercurial offers?

For those who don't know that the proposed workflow for historical merge in svn is this:

  • branch
  • From a development trunk to do your job.

  • Regularly merge changes from the outside into your branch to stay up to date.

  • Drain back when you do mergeinfo to smooth the process.

Without combining historical data, this is a nightmare, because the comparison is strictly dependent on differences in the files and does not take into account the steps taken along this path. Thus, every change in the development trunk puts you in a potential conflict during the merger.

Now I would like to know:

Does mercurial merging provide a significant advantage over mergeinfo in SVN or is it just a lot of hot air about nothing?

Has anyone used the mergeinfo function in SVN and how good is it in practice?

+4
source share
1 answer

As mentioned in the comments, this SO question pretty much sums it up, but it points to the exact Subversion documentation (1.6 latest!) That states the merge restriction:

  svn merge --reintegrate ^ / branches / my-calc-branc

once the --reintegrate merge --reintegrate done from branch to trunk, the branch can no longer be used for further work. He is not able to properly absorb new changes in chests and cannot be reintegrated into the trunk again.

What? If you have worked more on this branch since the last merge back into the trunk, you can no longer do the second merge --reintegrate ?
You need to create another branch or use the cherry syntax with another option to save it.

The conclusion tells you everything you need to know:

The bottom line is that the Subversion merge tracking function has an extremely complex internal implementation , and the svn:mergeinfo is the only window the user has on the machines. Since this function is relatively new, a number of extreme cases and possible unexpected actions may appear.

For example, sometimes mergeinfo is generated when you run a simple svn copy or svn move .

  • Sometimes mergeinfo appears in files that you did not expect to be affected by the operation.
  • Sometimes mergeinfo is not generated at all when you expect it.

In addition, mergeinfo metadata management has:

  • a whole set of taxonomies and behaviors around it, such as “explicit” and “implicit” mergeinfo, “operational” and “inactive” changes,
  • specific mechanisms of mergeinfo "elision",
  • and even "inheritance" from parent to child directories.

Compare this with DVCS:

Just merge already;)

This does not mean that SVN does not know how to merge (for a simple unification of the workflow , it will do the job), but the complexity of its main mechanism will restrain the use of branches and merges, making several merges that remain rather trivial.
In contrast, the ease of merging operations in DVCS will increase branch utilization and the complexity of the merge scenario, which are no longer an issue.

+7
source

Source: https://habr.com/ru/post/1310584/


All Articles