Note that there are some explanatory texts on larger screens.

plurals
  1. PO`git svn dcommit` failing on a branch
    text
    copied!<p>I have been using <code>git-svn</code> to communicate with my company’s svn repo for a while now without any major headaches.</p> <p>Today, the “headache”-part changed dramatically:<br> I’ve been working on <code>master/trunk</code> pretty exclusively, and needed to merge most (but not all!) of those change-sets into a new svn-branch, that originated from a pre-existing svn-branch.</p> <p>Basically this:</p> <pre><code>-----------1--1-----1--------1--1--1--- master/trunk \ \ 2--2--2--2--2 versioned-release </code></pre> <p>Should have become this:</p> <pre><code>-----------1--1-----1--------1--1--1--- master/trunk \ \ 2--2--2--2--2 versioned-release \ \ 1--1--1--1--1--1 new-versioned-release </code></pre> <p>Where <code></code> are commits that shouldn’t be in the <code>new-versioned-release</code>, and <code>x</code> the wanted commits from the respective branches <code>x</code>.</p> <p>So I did the following:</p> <ol> <li><code>git checkout -b versioned-release-svn remotes/versioned-release</code></li> <li><code>git svn branch new-versioned-release -m "Preparing for merge of XXX"</code></li> <li><code>git checkout -b new-versioned-release-svn remotes/new-versioned-release</code></li> <li><code>git cherry-pick ...</code> for every <code>1</code>, resolving any conflicts on the way.</li> </ol> <p>Because I wanted to be sure I was really going to target the correct branch on the repo, I then ran <code>git svn dcommit --dry-run</code> which did not yield any errors or warnings, but told me…</p> <pre><code>Committing to svn://username@$repo-host/$repo-name/$path/branches/new-versioned-release ... </code></pre> <p>…followed by a couple of <code>diff-tree</code> lines.</p> <p>So I attempted to omit the <code>--dry-run</code> and half way through the commits ended up with…</p> <pre><code>Item already exists in filesystem: File already exists: filesystem '/data/subvroot/$repo-name/db', transaction '20856-g3m', path '/$path/branches/new-versioned-release/some-directory' at /usr/libexec/git-core/git-svn line 862 </code></pre> <p>…and a <strong>bunch</strong> of unstaged changes.</p> <p>Apart from the obvious — “WTF?!?” and “How do I get out of this mess without losing everything I did?” — I have two questions:</p> <ol> <li>Assuming I was back to before <code>git svn dcommit</code>: How do I get my local branch dcommit to its planned destination?</li> <li>By now it seems obvious, that this wasn’t the right way to achieve what I wanted…but <em>how</em> should I have done it, instead?</li> </ol> <p>Everything I found for the error-message, that somehow resembled my situation, so far was <a href="https://stackoverflow.com/questions/2922059/how-to-recover-from-an-unwanted-rename-using-git-svn-transaction-is-out-of-dat">this other stack overflow question</a> and the proposed solution of “somehow […] to blow away the <code>.git/svn</code> metadata directory” doesn’t resonate quite <em>that</em> well with me…</p>
 

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