How to automate SVN merge when the automation test passes?

After each submission to the’trunk’, we will automatically perform a series of tests on the trunk. When these tests pass, I want to automatically merge them into the “tests-passed” Branching. When the test fails, the merge will not occur, but once the problem is fixed on the “trunk” of the next or later submission, all changes should be merged.

The key is to have A branch with the same content as trunk, but this is more sane than’trunk’, because at least automated testing has passed.

I have a script that tries to do this manually, but this is one that uses a custom The attribute hack, doesn’t always work properly-as I just discovered. How can I best make Subversion do this?

As long as you confirm the new trunk version , you will be Run these commands in the root directory. The test has passed:

svn update
svn merge http://example.com/svn/myproject/trunk- r 0:
svn commit -m "merged trunk revisions up to into tests-passed"

Whenever you use the merge command, SVN will be in the svn: mergeinfo attribute Record the merge. Therefore, the above command should automatically determine which revisions are in range 0: is eligible for the merge and does not include any merges that have been completed.

As you said in the comments, No conflicts are expected. But sometimes I see unexpected conflicts occur anyway when merging a series of SVN revisions that include renames. To eliminate these conflicts, you can use the –accept theirs-full option and the merge command to always accept the trunk Status.

After each submission to the’trunk’, we will automatically conduct a series of tests on the trunk. When these tests pass, I want to automatically merge the In the “tests-passed” branch. When the test fails, no merge will occur, but once the problem is fixed on the next or later submission of the “trunk”, all changes should be merged.

< p>The key is to have a branch with the same content as trunk, but this is more sensible than’trunk’, because at least automated testing has passed.

I have a script that tries to do this manually, but This is a hack that uses custom attributes and doesn’t always work properly-as I just discovered. How can I best make Subversion do this?

As long as you determine the new trunk version , these commands will be run in the root directory of the working copy of the test. The test has passed: < p>

svn update
svn merge http://example.com/svn/myproject/trunk -r 0:
svn commit -m "merged trunk revisions up to into tests-passed"

Whenever you use the merge command, SVN will record the merge in the svn: mergeinfo attribute. Therefore, the above command should automatically determine the scope Which revisions in 0: is eligible to merge, excluding any merges that have been completed.

As you said in the comments, conflicts are not expected to occur. But sometimes I see When merging a series of SVN revisions that include renames, unexpected conflicts will occur anyway. To eliminate these conflicts, you can use the –accept theirs-full option and the merge command to always accept the trunk status.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2252 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.