Click here to Skip to main content
15,895,777 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Yet another Subversion rant Pin
Stuart Dootson23-Apr-13 5:56
professionalStuart Dootson23-Apr-13 5:56 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang23-Apr-13 22:21
Stefan_Lang23-Apr-13 22:21 
GeneralRe: Yet another Subversion rant Pin
Stuart Dootson23-Apr-13 23:30
professionalStuart Dootson23-Apr-13 23:30 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang24-Apr-13 4:25
Stefan_Lang24-Apr-13 4:25 
GeneralRe: Yet another Subversion rant Pin
Stuart Dootson24-Apr-13 4:43
professionalStuart Dootson24-Apr-13 4:43 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang24-Apr-13 5:25
Stefan_Lang24-Apr-13 5:25 
GeneralRe: Yet another Subversion rant Pin
Trajan McGill24-Apr-13 11:35
Trajan McGill24-Apr-13 11:35 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang24-Apr-13 21:41
Stefan_Lang24-Apr-13 21:41 
No, a branch in SVN is not a directory, it is a link!

The problem is that everything was performed inside the working directory, i. e. there was only ever one version: copying a directory and a file, renaming it, and chancging it, all was performed within the same working directory. That means everything always was only a single version at any one time! Every command intended for branching was instead interpreted as a physical change of the working directory.

There is a subtle distinction in the svn copy command: if you create a copy in the repository, that copy is created as a link, and effectively creates a branch. If you create a copy in the working directory however, it is just that: a copy. Without further information, SVN can not distinguish whether your local copy was meant to be an actual copy or a new branch, so it goes by the obvious interpretation. See http://svnbook.red-bean.com/en/1.1/re07.html[^]

The correct command would have been:
svn cp file:///d:/svn-repos/test2/trunk file:///d:/svn-repos/test2/branches/test_branch


And after that the new branch should have been checked out to a separate working directory, e. g.:
cd ../..
mkdir test_branch
svn co file:///d:/svn-repos/test2/branches/test_branch test_branch
cd test_branch


Then you could resume your work renaming/changing a, and merging that back to the trunk.
GeneralRe: Yet another Subversion rant Pin
Trajan McGill25-Apr-13 5:28
Trajan McGill25-Apr-13 5:28 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang25-Apr-13 21:22
Stefan_Lang25-Apr-13 21:22 
GeneralRe: Yet another Subversion rant Pin
Trajan McGill26-Apr-13 4:57
Trajan McGill26-Apr-13 4:57 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang24-Apr-13 23:16
Stefan_Lang24-Apr-13 23:16 
GeneralRe: Yet another Subversion rant Pin
Stuart Dootson24-Apr-13 23:30
professionalStuart Dootson24-Apr-13 23:30 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang25-Apr-13 1:32
Stefan_Lang25-Apr-13 1:32 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang25-Apr-13 21:50
Stefan_Lang25-Apr-13 21:50 
GeneralRe: Yet another Subversion rant Pin
Member 376360822-Apr-13 13:07
Member 376360822-Apr-13 13:07 
GeneralRe: Yet another Subversion rant Pin
EdReel22-Apr-13 14:45
EdReel22-Apr-13 14:45 
GeneralRe: Yet another Subversion rant Pin
BobJanova22-Apr-13 23:55
BobJanova22-Apr-13 23:55 
GeneralRe: Yet another Subversion rant Pin
Stefan_Lang24-Apr-13 4:28
Stefan_Lang24-Apr-13 4:28 
GeneralRe: Yet another Subversion rant Pin
Vasudevan Deepak Kumar23-Apr-13 9:58
Vasudevan Deepak Kumar23-Apr-13 9:58 
GeneralRe: Yet another Subversion rant Pin
Clifford Nelson24-Apr-13 10:17
Clifford Nelson24-Apr-13 10:17 
GeneralDirect me to USB Pin
C-P-User-315-Apr-13 7:57
C-P-User-315-Apr-13 7:57 
GeneralRe: Direct me to USB Pin
ENOTTY15-Apr-13 8:46
ENOTTY15-Apr-13 8:46 
GeneralRe: Direct me to USB Pin
LloydA11115-Apr-13 9:19
LloydA11115-Apr-13 9:19 
GeneralRe: Direct me to USB Pin
Pete O'Hanlon16-Apr-13 1:54
mvePete O'Hanlon16-Apr-13 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.