Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy doesn't svn merge --ignore-ancestry work twice in this scenario, when svn diff+patch does?
    primarykey
    data
    text
    <p>I'm trying to replace my svn merging workflow — which is usually <code>svn diff</code>, sometimes some manual editing of the patch, and then <code>patch</code> — with actual <code>svn merge</code>. But I'm seeing some unexpected behavior, and I can't find an explanation in any of the SVN documentation on-line. Here's my scenario:</p> <ol> <li>New repository (rev. 0)</li> <li>Created a blank file called <code>file</code> in trunk (rev. 1)</li> <li>Copied trunk to branches/branch1 (rev. 2)</li> <li>In branches/branch1, changed <code>file</code> to read "abcdefg" and committed (rev. 3)</li> <li>Back in trunk, ran:</li> </ol> <p><code>svn merge -c3 ^/branches/branch1 . --ignore-ancestry</code></p> <p>So far, so good. <code>file</code> in trunk contains "abcdefg". And trunk did not get updated with any mergeinfo, since I used --ignore-ancestry. To verify, I run:</p> <p><code>svn pg svn:mergeinfo .</code></p> <p>which prints out nothing. Great. So now I want to apply the change in r3 <em>again</em>. So I run:</p> <p><code>svn merge -c3 ^/branches/branch1 . --ignore-ancestry</code></p> <p>This command does <em>nothing</em>. Prints out no output, does not change <code>file</code>, and does not add any mergeinfo. If I do the same thing with my old diff-and-patch workflow, like this:</p> <p><code>svn diff -c3 ^/branches/branch1 | patch</code></p> <p>Then file is updated with the change again. And since the change amounted to just:</p> <pre><code> --- file (revision 2) +++ file (revision 3) @@ -0,0 +1 @@ +abcdefg </code></pre> <p>applying it again just makes <code>file</code> contain two lines of "abcdefg", as intended.</p> <p>~~~</p> <p>I know this shouldn't be a common workflow, but I feel like I need to understand what <code>svn merge</code> is actually doing in situations like this before I can comfortably adopt it. (No need espousing the benefits of <code>svn merge</code> — I'm already on board.)</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload