简体   繁体   中英

Merge source from one SVN repository into another?

I'm very familiar and right at home with git, but I recently started working at a larger organization where svn is used, and I'm somewhat unfamiliar with it. In the current project I'm working on, we have two separate svn repositories, one for test/development and one for production. One of my coworkers made some hotfixes right in production, admitting he shouldn't but did anyway. So now it's my job to merge his changes from the production repo into the test/development repo and then push the merged source back out to the prod repo.

How do I do this using SVN?

In git I would:

# in development repo
git remote add prod SOME_URI_HERE
git fetch prod
git merge prod/master
# resolve conflicts, if any...
git push prod master

What's the equivalent workflow/thought process in SVN?

Thanks!

Suppose your test/development branch of svn branch is TEST_DEV_URL , and the hotfix's URL of svn branch is HOTFIX_URL .

First, you should checkout hotfix branch:

svn checkout HOTFIX_URL hotfix_name

Second, cd hotfix_name svn working directory, and merge your test branch to hotfix:

svn mergeinfo TEST_DEV_URL hotfix_name # test merge
svn merge TEST_DEV_URL hotfix_name

# Third, resolve conflicts, if any...

Last, commit your merges:

svn commit -m "" 

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