Previous PREV, BASE, or COMMITTED keywords are not valid for the URL when re-integrating the branch

I forked my chest (in the previous edition) and implemented / launched a new function and implemented part of another function locally in the branch. Now I need to reintegrate the finished function in the torso.

I svn cp branches/completedfeature branches/uncompletedfeature to get a partially completed function in my own branch. I then svn revert -R . everything is in the first branch, so it is updated.

Now that I svn merge --reintegrate ../../branches/completedfeature from the torso, I get this cryptic (to me) error:

 PREV, BASE, or COMMITTED revision keywords are invalid for URL while reintegrating a branch 

Both the trunk and the completed function branch are updated without any local changes. What's happening?

+6
source share
3 answers

Looks like I slightly branched it / wrong. I did not understand how to fix this correctly, since everyone in this situation is how I got my changes in the trunk, saving most of the history of this short-lived branch:

Find all your files that have changed diff -ur trunk branch . Make sure you look at diff, since any changes in the trunk that are not in the branch will be returned, so ignore these files or, if there are changes in the file in the file, be sure to manually edit diff later.

Copy all new files with svn to keep their history svn cp branch/path/file trunk/path/file

Now you need changes to the files that have not changed. You cannot perform two merges of the source, because (at least in svn 1.7 in cygwin) it will delete and then add the file, destroying the history. The option I chose is to create / apply a patch and make a commit message about what happened.

There is a better way to find out about the fixes, but below is what I did. Keep in mind that you will have to manually fix merge problems if you have files that have been modified in both files.

Create your patch with diff -u trunk/path/file branch/path/file >> patch.patch Do this for each file or go to the recursive flag again and it will have a difficult job.

Do a dry run to make sure the patch works and gets the patched files patch -p0 --dry-run < patch.patch Then patch -p0 < patch.patch it patch -p0 < patch.patch

Then make sure the project builds and validates it.

Leaving this question open in the hope, someone knows the real answer.

+1
source

I had this error.

Your question was almost the only Google result ( here is a description of the keywords ).

I had a long branch with branches merged into it ... the patch process was long and difficult. Therefore, even though this section of SVD redbood suggests that you should combine the two working copies, I optimistically tried to reintegrate from the url and it will work!

 cd myLocalTrunk svn merge --reintegrate https://svn.blah.blah/blah/blah/branches/myBranch svn ci -m "reintegrating myBranch into trunk" 
+6
source

In general, there is no need to use patch files here - any range of β€œ-cx” or β€œ-rx: y” is actually a set of changes, that is, the type of patch that can be applied. Let's make a complete example, so initially

 svn copy trunk/path/file branch/path/file 

and after that you can work on the trunk. Now you need to know the range of changes in order to apply the changes to the target - since the version number is global, you can request both files, for example

 svn info trunk/path/file # 35 svn info branch/path/file # 27 

This is the range of use, now you can say

 svn merge -r 27:35 trunk/path/file branch/path/file 

You can think of it as if he were creating a patch file within himself for the range of 27:35 applied to the target. As long as this is just a file to file, you cannot even get a tree conflict (think of renamed files as directory merge).

0
source

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


All Articles