Git-svn Rename branch and use it as new SVN 39trunk39 instead of using quotmerge --reintegratequot

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I have a Ruby on Rails project that I am working on which uses SVN (1.6.17, Debian) for version control. Locally I am using Git (2.5.4, OS X) with git-svn and I have been working on a branch (called "ruby22rails42") for a major update to the project (using a new framework version) and regularly pulling in changes from SVN "trunk" to keep up to date with the project. Recently, I have created a mirror branch ("/branches/v8.5-ruby22rails42") on our online SVN server, pushed my local Git branch there and merged again with trunk for other developers to take a look.

Now I basically want "/branches/v8.5-ruby22rails42" to be the new trunk and keep the old SVN trunk as a versioned branch (let s call it "/branches/v8.4-ruby19rails3"). Unfortunately, svn merge --reintegrate seems to fail with "mergeinfo not supported" errors:

/opt/trunk$ svn merge --reintegrate ^/branches/v8.5-ruby22rails42
svn: Abfrage der Zusammenführungsinformationen wird von »file:///.../branches/v8.5-ruby22rails42« nicht unterstützt

Would a svnadmin upgrade fix this error? I do not want to update the SVN utilities on the server right now because the SVN repo is accessed by a lot of other tools too.

If not:

(How) can I just rename trunk both on the SVN server and my git-svn local repository and use my branch as the new trunk and so avoid the tedious merge process in SVN altogether? How would I tell my local Git repo to keep track of this renaming process? This may require all clients to discard local checkouts and re-check out the new trunk, but that would be acceptable.

If this is not possible or desirable, how do I avoid the mergeinfo error above using Subversion 1.6.17 and successfully merge my branch into trunk? I can then create a new branch from the last commit before the merge and keep this as my "v8.4-rails3ruby19" branch.

Answers

I might be missing something in your context, but normally you do not want to replace the original tag but rather succeed it. What I would probably consider at your place is something like the following sequence:

    • Tag the current trunk or/and create a quick fix branch /branches/v8.4-ruby19rails3
    • Merge your branch into trunk. Either via svn or git/git-svn

e.g. the following sequence will squash all your works at your branch and put it to trunk:

git svn fetch
git checkout svn/trunk
git merge --squash ruby22rails42
git commit -m "Merged ruby22rails42"
git svn dcommit

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/34334187/git-svn-rename-branch-and-use-it-as-new-svn-trunk-instead-of-using-merge-r

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils