Hi, Stefan, On Wed, Jun 25, 2014 at 11:46 AM, Stefan Sperling <s...@elego.de> wrote:
> On Wed, Jun 25, 2014 at 10:47:47AM -0700, Xin LI wrote: > > Hi, > > > > In the FreeBSD project, we use "vendor branch" and merge changes that > > happen there to trunk. The FreeBSD project's repository can be accessed > at > > svn://svn.freebsd.org/base or via web at http://svnweb.freebsd.org/base > . > > > > Now I'm facing a problem with the merging approach and would like to know > > if there is a good solution to this. Long story short, I have done a > > series of 'svn mv' before applying new vendor code into vendor branch so > > can maintain file's history (commit message can be seen at [1]). > > > > When merging that changeset to ^/head/contrib/file, I got a lot of > > conflicts, complaining on local modification vs incoming delete. > > > > Is there a way to keep the file history when doing the merge? The > > repository was converted from CVS where we do heavy repo-copies to > maintain > > that. > > I can reproduce the tree conflicts. > > Recall that SVN models renames as a copy and a delete, which are handled > independently by Subversion. So it helps to think in terms of copy+delete > when you resolve these conflicts, rather than thinking about it in term > of a "move" operation. > > Tree conflicts are flagged on files which are deleted by the merge and > differ in content from the file which were originally deleted. You'll > have to compare each of the conflicted files to the corresponding file > at the move target location (e.g. ascmagic.c to src/ascmagic.c), e.g. > like this: svn diff --old ascmagic.c --new src/ascmagic.c > > Then you'll need to decide if any changes from the old ascmagic.c > need to be applied to the new src/ascmagic.c. Once you've done that, > you can mark the conflict resolved: svn resolved ascmagic.c > > There are other ways of dealing with this, but the above is probably > the easiest approach to get going with. > Thanks for that. Is it possible to tell svn that the file have two parents? e.g. it's derived from both contrib/file/ascmagic.c and ^/vendor/file/dist/src/ascmagic.c? Or is that impossible with svn? -- Xin LI <delp...@delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die