I did some serious stupidity with svn move
and svn ci
.
Old directory structure:
source/branch1/test_framework/
source/branch2/test_framework/
Desired directory structure:
source/branch1/
source/branch2/
source/test_framework/ <-- This is a merge of the 2
Expected steps:
- Move source/branch1/test_framework/ to source/test_framework/
- Merge source/branch2/test_framework/ into source/test_framework/
How I started:
[dev@bld Prod1]$ svn move source/branch1/test_framework/ source/test_framework/
A source/test_framework
D source/branch1/test_framework/main.sh
D source/branch1/test_framework
What I should have done:
[dev@bld Prod1]$ svn ci source/test_framework/ source/branch1/test_framework/ -m "Move test framework to top level."
My Stupidity:
[dev@bld Prod1]$ svn ci source/test_framework/ -m "Move test framework to top level."
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
Adding source/test_framework
Committed revision 274232.
[dev@bld Prod1]$ svn ci source/branch1/test_framework/ -m "Move test framework to top level."
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
Deleting source/branch1/test_framework
svn: Commit failed (details follow):
svn: Item '/repo/CoreApps/Prod1/source/branch1/test_framework' is out of date
Here, I looked up Google and StackOverflow and did the following fix suggested for the Item ... out of date
error:
[dev@bld Prod1]$ svn update
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
C source/branch1/test_framework
At revision 274233.
Summary of conflicts:
Tree conflicts: 1
Now I get stuck with this:
[dev@bld Prod1]$ svn ci source/branch1/test_framework/ -m "Move test framework to top level."
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
svn: Commit failed (details follow):
svn: Aborting commit: '/repo/CoreApps/Prod1/source/branch1/test_framework' remains in tree-conflict
Now how do I fix this conflict? Please note that the svn merge
is not an issue, and is instead just an explanation point of how I reached here.
I'd appreciate answers that give the reasoning on what to do as well.
Edit - The solution I used to fix my issue (This is not ideal. The accepted answer is better):
svn status source/branch1/test_framework/
to list the files deleted during thesvn move
svn revert source/branch1/test_framework/$FILE
for each file listed above to undo the removal/deletion action of thesvn move
svn delete source/test_framework/
to undo the copy action of thesvn move
followed bysvn ci source/test_framework/
to check-in the deletion.- Do it correctly.