Sublime Forum

Using SVN same way like Eclipse Mars SVN

#1

I was able to download and install Sublime Text 3 with SVN. I checked out a repository, but it didn’t show up as a project. So, I opened the folder where it was checked out by dragging it into the Sublime window.

How I can open my checked out code as a project in Sublime Text 3? And what is the meaning of a Project in Sublime? Is it same like in Eclipse?

Also, I did a small change to one file, and I was able to see the differences against the repository. However, I am trying to update to get the latest version from the repository, but this is not working, I mean I still see the changes I did on the local file. Also I see this message:

UNREGISTERED: Please visit http://sublime.wbond.net/svn
Working copy: C:\Users\Tarek.Faham\sublime\nas
Command: svn.exe update --accept postpone --ignore-externals WebContent\formhtml5\js\angularJS\app.js

Updating ‘WebContent/formhtml5/js/angularJS/app.js’:
At revision 25193.

See screenshot below for more details.

I need to use SVN same way I do using SVN with Eclipse Mars. For example, find differences, browse them using next/previous difference, and then chose what to do with every difference.

Appreciate your help.

Tarek

0 Likes

#2

Projects in Sublime are not the same as they are in Eclipse per se because Eclipse is an IDE and Sublime is a Text Editor. As such, a project in Sublime is (simplistically speaking) a way to associate a set of folders and files together to keep yourself organized. There are added benefits to doing this, such as gaining the ability to include and exclude files within the open paths from showing up in the side bar and having various settings that are specific to your project.

You can open a project in Sublime in various ways:

  • Creating a new window and dragging a folder or folders onto it, as you did above
  • Creating a new window and choosing Project > Add Folder to Project from the menu
  • Using items from the Project menu to open an already existing project, such as Project > Open Project

If you use the first two methods, your project is not persisted anywhere, so you probably want to do Project > Save Project As... from the menu; then going forward you can just open the existing project.

Updating a SVN working copy fetches all of the changes from the remote end and merges them in to your working copy to bring yours up to date; it doesn’t commit your changes to the repository. As a result this is working as expected. If you meant to throw away your changes and go back to what the repository thinks the content should be, you should be using revert, not update. That command is reached from the Applicable Commands... part of the menu in your screenshot; it only appears for files with local modifications, though.

UNREGISTERED: Please visit http://sublime.wbond.net/svn
Working copy: C:\Users\Tarek.Faham\sublime\nas
Command: svn.exe update --accept postpone --ignore-externals WebContent\formhtml5\js\angularJS\app.js

================================================================================
Updating 'WebContent/formhtml5/js/angularJS/app.js':
At revision 25193.

That’s the plugin telling you A) that it’s a paid plugin and you’re using the unregistered version, B) that your subversion working copy is at the given location, C) what command it executed, and D) what files were updated and what revision you ended up with.

The SVN plugin only shows you the same diff output that you would get by using svn diff from the command line, so this is not possible via just the plugin. It has support for setting up an external diff tool so if you have something external that you like to use for that purpose you could do that.

If you want to go solely from inside of Sublime for this you need another plugin to do it. My personal recommendation would be the Sublimerge plugin. Sublimerge Pro is for Sublime Text 2 and Sublimerge 3 is an enhanced version for Sublime 3. Both versions support SVN (as well as Mercurial and Git) and allow you to navigate via changes and choose left or right to merge together.

1 Like

#3

Thank you so much! Very detailed reply. Sometime ago, I saw a colleague using Sublime Text to find differences and browse them in a very nice way, and he told me it is free. He used some option to get a list of differences against the latest copy form the repository for all changes he made to all files in his project, and he could drill down to get more details. It seems the package you referred to “Sublimerge Pro” is a paid one. Is there such package that will provide such functionality?

Tarek

0 Likes

#4

There may be; someone else may know and chime in or you can check PackageControl and see what pops up (maybe DiffView)?

Sublimerge was the first and last one that I checked out when I was looking for something to do visual diffing without having to jump out to SmartGit/SmartSVN so I never delved very deeply into what else might be available.

0 Likes

#5

Thank you again. DiffView seemed pretty close to what I saw with the colleague some time ago. I think I will be able to find my way from now on.

Tarek

1 Like