dans La techno

For one week, I have been struggling with a weird problem. Let me summarize. I had an SVN working copy of WordPress. I needed to update this site to the latest WordPress. So I did the same as I always do: downloaded the latest WordPress, extracted it, went inside the wordpress folder, selected all files and folder, copied, then went into my working copy and pasted. I was then asked if I wanted to replace the content and blablabla, I said Yes.

Then, I went in Eclipse to commit my updated working copy, but then I was always getting an error. Something like « … containing working copy admin area is missing ».  I googled the problem, and the solution always seemed to be to delete the problematic folder and do an SVN update after. Which I did, and then I copied back the new WordPress files on top of my working copy. Then the same problem was occurring over and over again.

So I thought there was something wrong with the Subeclipse plugin inside my Eclipse. I deleted it and re-installed it. Same problem.

I googled for a subversion client for Mac. I discovered Versions which will definitely be the topic of my next post ;-). But always the same problem.

I finally used the command line to commit to our SVN repository. Same problem.

While I was on the command line, I moved inside wp-include folder, which was the folder giving me the error. I did an »ls -al » to list the files and folders inside. And to my biggest surprise, the « .svn » folder was not there! Of course, if the .svn folder is not there, it’s absolutely normal that I am not able to commit! And the message kind of made sense: « containing working copy admin area is missing »…

Then it struck me! When I’m copying the files and folders from the new WordPress package to my working copy, the process is actually « replacing » everything, hence deleting all those .svn folders !!! Could it be possible that the copy-paste feature of Mac is so different then what we are used to on Windows or Linux ?

I jumped on Hootsuite and tweeted to ask for help! Two people contacted me in the next 10 seconds. My friend xperseguers then explained me that indeed, the copy-paste feature on a Mac has a completely different concept then on Windows or Linux. When you copy-paste on a Mac, if a folder has the same name, it will actually get completely replaced. That means that you will loose everything you previously had in that folder! That’s totally different from the other OS we are used to where a copy-paste would actually merge the contents…

So then what is the solution to my problem ? Well, there is probably a GUI solution but I did not had time to check, so I use the good old command line:

cp -rf wordpress/* myworkingcopy/

And that worked perfectly! I was then able to commit without a problem!

D'autres billets

Leave a Reply