简体   繁体   中英

i need to merge a file from a branch to trunk with svn merge

I'm not allowed to use cherry pick, and they only want specific changes from one file (possibly 2) from one bug fix branch to the trunk. The bug fix branch is an older release, so we don't want to merge the entire thing; just the new additions to the specific file. I used cherry pick once before in a similar and even messed that up :) . So no one uses that, one person told me you could do something like -r500:501 to just merge those changes in, but that was a long time ago and he's long gone. Any pointers? I'm lost :( . I thought this is what cherry picking was supposed to be used for, but evidently that causes it's own set of problems.

One other piece of info, my previous cherry pick seems to have mostly caused a problem because I didn't do it from the top most root directory, at least according to what I wrote in my notebook.

Looks like

svn merge -r <branch_version - 1>:<branch_version_desired> <BRANCH_URL> <WORKING_DIRECTORY>

gave me the option. It only merged in the 2 changed files, and I picked "mine-full" on a couple of binary files that I didn't want it to "merge" . After doing and "svn diff" it looks like only the two files with the correct changes are indeed changed, and a few properties changed as well, but I'm not so concerned about those. I think it worked :) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM