Jawad Amjad
Jawad Amjad

Reputation: 2552

Commiting Data from Versions to SVN in mac

I am trying to commit data to Visual SVN via Versions in macBook. I have created the repository, imported it and committed it successfully.

Now I have changes in the data I have added a new folder with some images in it into my working copy, I should be able to commit it now, but in Versions I am not able to see the newly added folder, and when I click commit it says nothing to commit but I have new data in working copy so it should also be committed and repository version should be updated.

Why I am not able to see the newly added folder and images in Versions? I want to commit the data now.

Upvotes: 0

Views: 467

Answers (1)

David W.
David W.

Reputation: 107080

There are three distinct components:

  • Your Subversion repository which is served by a repository server. In your case, it's Apache HTTPD through VisualSVN. This repository may or may not be on your Mac, and you should never access it directly.
  • Your Subversion working directory. This is where you checkout your code, commit changes, etc. This client will talk to the repository server and update the repository.
  • A repository browser that browses the files in the repository itself.

It's hard to say exactly what the issue could be. I never used Versions, but I suspect it comes with some sort of repository browser. I suspect that you added files and directories in your Mac's working directory, but have not yet committed them. If this is the case, and you're browsing the repository with Versions, you won't see what you've added because it isn't in the repository yet.

On the other hand, you could have committed the changes in revision 234, but your Versions repository browser is still set to version 233. You don't see the files in Versions because it's simply set to view an earlier version of the repository. It's like using the Wayback machine and looking at the year 2002 and wondering why you can't find Facebook.

Macs come with the Subversion command line client already built in. Learn it1. Even if you don't use it as your default client, you should know your way around with it. It's a great investigative tool to use when things don't look quite right. The command line client removes all of the GUI baggage that is hiding the inner workings of Subversion from you.

For example, if you did this:

$ svn ls $REPO_URL/trunk/myproject

and you see the committed files, you know the problem is your Versions repository browser. A quick investigation may reveal you're looking at an earlier version of the repository instead of the latest (HEAD) version.

If you see the same thing in svn ls that you see in Versions, you could look at your working directory:

$ cd $work_dir
$ svn status
A added_dir/
A added_dir/added_file.txt

Whoops! You forgot to commit your changes.


1. You need to be careful with the client version of Subversion. For years, you could use different versions of the subversion client on the same working directory. Not any more. Using the wrong version could destroy your working copy.

Therefore, see what version your Versions browser/client is up to, and make sure your Mac's command line client is at a similar version. I see that Versions says Now with 1.8 support. Check your subversion command line client's version:

$ svn --version
svn, version 1.7.10 (r1485443)
   compiled Aug 13 2013, 15:31:22

Whoops, it's a 1.7 client. Fortunately Wandisco has the 1.8 Macintosh command line client.

Upvotes: 2

Related Questions