Hello
I started using subversion a while back and doing a merge I lost a bunch
of source code which prohibited me from updating production for weeks.
I now have a stable code base and wish to use subversion so I tried to
follow chapter 4, branching and merging. It failed. I was hoping
someone could tell me what I am doing wrong. I went through the process
twice and got the same result, so at least I make the same mistake
consistently. There are a couple of weird unexplained behaviors I am
noting along with a log of what I did.
1) I was on revision 4. I then branced it, made a change and it
jumped to revision 7. Why? Does the revision apply to all folders
under a repository?
2) I made a change to the branch, commited it to revision 6. Then
made a change to the trunk to revision 7 (from 4). Then I tried to
merge the change from the trunk to the branch and it required an update.
Why?
3) Now it says text conflict. What does that mean?
Is there another section in the book that may explain merging? Another
read? I would like to get subversion working without any more code
loss.
Here's what I did:
1. Create repository on the server called "test" with trunk and
branches directories.
2. Issue the command G:\Code\st>svn checkout
https://server.com/svn/test/trunk .
3. Added the project using tortoise (14 files/directories).
4. Made a change to the project.
5. Issue the command G:\Code\st>svn commit -m "Two"
Adding WindowsApplication1
Adding WindowsApplication1\Form1.Designer.vb
Adding WindowsApplication1\Form1.resx
Adding WindowsApplication1\Form1.vb
Adding WindowsApplication1\My Project
Adding WindowsApplication1\My Project\Application.Designer.vb
Adding WindowsApplication1\My Project\Application.myapp
Adding WindowsApplication1\My Project\AssemblyInfo.vb
Adding WindowsApplication1\My Project\Resources.Designer.vb
Adding WindowsApplication1\My Project\Resources.resx
Adding WindowsApplication1\My Project\Settings.Designer.vb
Adding WindowsApplication1\My Project\Settings.settings
Adding WindowsApplication1\WindowsApplication1.sln
Adding WindowsApplication1\WindowsApplication1.vbproj
Transmitting file data ............
Committed revision 2.
6. Made a change to the project.
7. Issue the command G:\Code\st>svn commit -m "Three"
Sending WindowsApplication1\Form1.Designer.vb
Transmitting file data .
Committed revision 3.
8. Made a change to the project to simulate a feature.
9. Issue the command G:\Code\st>svn commit -m "Four"
Sending WindowsApplication1\Form1.Designer.vb
Transmitting file data .
Committed revision 4.
10. Issue the command G:\Code\st>svn copy
https://server.com/svn/test/trunk
https://server.com/svn/test/branches/feature -m "Feature"
Committed revision 5.
11. Changed the current directory from st (subversion test) to stb
(subversion test branch.
12. Issue the command G:\Code\stb>svn checkout
https://server.com/svn/test/branches/feature .
A WindowsApplication1
A WindowsApplication1\WindowsApplication1.vbproj
A WindowsApplication1\Form1.resx
A WindowsApplication1\Form1.Designer.vb
A WindowsApplication1\Form1.vb
A WindowsApplication1\WindowsApplication1.sln
A WindowsApplication1\My Project
A WindowsApplication1\My Project\Resources.Designer.vb
A WindowsApplication1\My Project\Settings.settings
A WindowsApplication1\My Project\AssemblyInfo.vb
A WindowsApplication1\My Project\Settings.Designer.vb
A WindowsApplication1\My Project\Application.Designer.vb
A WindowsApplication1\My Project\Application.myapp
A WindowsApplication1\My Project\Resources.resx
Checked out revision 5.
13. Made a change to the feature branch.
14. Issue the command G:\Code\stb>svn commit -m "Six-feature"
Sending WindowsApplication1\Form1.Designer.vb
Transmitting file data .
Committed revision 6.
15. Changed the current directory from stb to st.
16. Made a change to the project to simulate a bug fix.
17. Issue the command G:\Code\st>svn commit -m "Five-bug fix"
Sending WindowsApplication1\Form1.Designer.vb
Transmitting file data .
Committed revision 7.
*** Why 7?
18. Changed the current directory from st to stb to try to merge the
bug fix to the feature branch.
19. Issue the command G:\Code\stb>svn merge
https://server.com/svn/test/trunk --dry-run
svn: E195020: Cannot merge into mixed-revision working copy [5:6]; try
updating first
*** Why update? No one else is doing anything!!
20. Issue the command G:\Code\stb>svn update
Updating '.':
At revision 7.
*** Why go to 7?
21. Issue the command G:\Code\stb>svn diff -r6:7
(Nothing returned using -r5:7 displays the changes I made)
22. Issue the command G:\Code\stb>svn merge
https://server.com/svn/test/trunk --dry-run
--- Merging r5 through r7 into '.':
C WindowsApplication1\Form1.Designer.vb
Summary of conflicts:
Text conflicts: 1
What does that mean?
Thanks
John
Received on 2012-09-12 20:08:41 CEST