Author Topic: SlickEdit plus Subversion  (Read 20739 times)

Thomas

  • New Community Member
  • Posts: 1
  • Hero Points: 0
SlickEdit plus Subversion
« on: July 11, 2006, 07:30:59 pm »
Hi,

I'm evaluating SlickEdit 11.0.1 and I've encountered problems with a proper handling of Subversion.
To be more specific...I've got a VS 2005 poject which is versioned using SVN.
I opened it with SlickEdit (the sources were already checked out) and configured versioning system. What I was expecting then is that SlickEdit was able to discover that all project's files were versioned (which it didn't do).
My question is what should I do to make SlickEdit discover the versioning system used ?
Perhaps I have missed some configuration ?

Thanks,

Tomek

gavink

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: SlickEdit plus Subversion
« Reply #1 on: July 12, 2006, 02:24:45 am »
I'd also be interested in hearing other people's experiences of SlickEdit and SubVersion. We use SlickEdit on Windows, but the SVN integration is sufficiently, well, I think lame is the word that we don't use the integration much. Instead we use Tortoise on Windows and SVN command line on Unix. At best I have checked a couple of file histories from within SlickEdit.

When it comes answering the original post, have you set tools/version control/set up? That's all I ever done to turn SVN integration on.

ronburk

  • Community Member
  • Posts: 22
  • Hero Points: 3
Re: SlickEdit plus Subversion
« Reply #2 on: July 12, 2006, 04:46:01 am »
I use SVN with VS. Though my needs are simple, I confess I do just switch to a command-line shell for many SVN operations. Some VS defaults seem to not match my needs, such as the fact that it always wants to ask me if I want to add all the files to version control instead of just the one I selected (even though it ought to have a clue that all the ones except the one I'm adding already are under SVN control).

I definitely do use the VS interface to SVN for diffs though.


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2389
  • Hero Points: 133
Re: SlickEdit plus Subversion
« Reply #3 on: July 12, 2006, 01:03:07 pm »
Hi,

I'm evaluating SlickEdit 11.0.1 and I've encountered problems with a proper handling of Subversion.
To be more specific...I've got a VS 2005 poject which is versioned using SVN.
I opened it with SlickEdit (the sources were already checked out) and configured versioning system. What I was expecting then is that SlickEdit was able to discover that all project's files were versioned (which it didn't do).
My question is what should I do to make SlickEdit discover the versioning system used ?
Perhaps I have missed some configuration ?

Thanks,

Tomek


As gavink  stated, please select this from the Version Control Setup dialog.  You should be in good shape then.  The SVN related commands will actually work from a key or command line even without this setup.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2389
  • Hero Points: 133
Re: SlickEdit plus Subversion
« Reply #4 on: July 12, 2006, 01:03:43 pm »
I'd also be interested in hearing other people's experiences of SlickEdit and SubVersion. We use SlickEdit on Windows, but the SVN integration is sufficiently, well, I think lame is the word that we don't use the integration much. Instead we use Tortoise on Windows and SVN command line on Unix. At best I have checked a couple of file histories from within SlickEdit.

When it comes answering the original post, have you set tools/version control/set up? That's all I ever done to turn SVN integration on.
Please post your suggestions or mail them to support.

badon232

  • New Community Member
  • Posts: 1
  • Hero Points: 1
Re: SlickEdit plus Subversion
« Reply #5 on: July 12, 2006, 06:56:39 pm »
I have not heard of great things with the SubVersion support.  I use Tortoise and love it.  I wrote this script to launch Explorer for the same folder of the current buffer.  This allows you to use Tortoise fairly naturally with SlickEdit. 


_command run_explorer()
{
   newsearch = 0;
   do
      {
      lastfound = newsearch;
      newsearch = pos('\', p_buf_name, lastfound+1 );
      }
   while( newsearch )

   if ( lastfound == 3) // at root, so want the \ at the end of the substr
      lastfound++;

   zdir = substr( p_buf_name, 1, lastfound-1 );
   cd( zdir );
   shell( "explorer " zdir );
}

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2389
  • Hero Points: 133
Re: SlickEdit plus Subversion
« Reply #6 on: July 12, 2006, 07:02:09 pm »
You can simplify this a bit by using _file_path.  Also you may want to look at strip_filename when you find yourself manipulating paths and filenames.

Code: [Select]
_command run_explorer()
{
   // _file_path will return just the path part of a filename that is passed in
   zdir = _file_path( p_buf_name);
   cd( zdir );
   shell( "explorer " zdir );
}

kgoess

  • Community Member
  • Posts: 10
  • Hero Points: 1
Re: SlickEdit plus Subversion
« Reply #7 on: July 12, 2006, 10:04:48 pm »
> I'd also be interested in hearing other people's experiences of SlickEdit and SubVersion. We use SlickEdit on Windows, but the SVN
> integration is sufficiently, well, I think lame is the word that we don't use the integration much.

Yeah, it needs work.  The "view history" doesn't follow file copies, so if you are working in a branch (a copy in subversion) you can't see the history before the beginning of your branch.  I suggested that fix in May, it's apparently in their Dev Tracker.

Today I tried "commit file" from the wrong-click menu in v.10 for the first time and it failed with a "log messages contains NULL" error, strace said it was trying to run a command that looked like

   svn >/tmp/6639002b19 2>&1 commit -F /tmp/6639001b19   Hello.pm

which isn't going to work, it's clobbering the file it's using for the commit message. So I downloaded v.11 trial to see if that had the same problem, and it looks like it's fixed in v.11, though I couldn't see any relevant difference in the macro files.

Then I was getting all excited about v.11 and was exploring features.  I saw the "commit sets" bit and used that for the first time.  Unfortunately, though you can put a bunch of files into a commit set, slickedit sends them to svn as separate commits instead of as a bunch.  With the focus svn has on all-or-nothing transactions, there's no reason not to run commit on the whole bunch at once.  It looks like _CVSCommand in cvsutil.e was built that way. Now my boss is going to yell at me for sending through a half-dozen files as separate commits instead of bunched into a single rev   :( 

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: SlickEdit plus Subversion
« Reply #8 on: July 16, 2006, 09:42:56 pm »
I currently use the SVN support within Slickedit only for diffs.  I perform all other commands from the command line.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2389
  • Hero Points: 133
Re: SlickEdit plus Subversion
« Reply #9 on: July 17, 2006, 03:09:37 pm »
> I'd also be interested in hearing other people's experiences of SlickEdit and SubVersion. We use SlickEdit on Windows, but the SVN
> integration is sufficiently, well, I think lame is the word that we don't use the integration much.

Yeah, it needs work.  The "view history" doesn't follow file copies, so if you are working in a branch (a copy in subversion) you can't see the history before the beginning of your branch.  I suggested that fix in May, it's apparently in their Dev Tracker.

Today I tried "commit file" from the wrong-click menu in v.10 for the first time and it failed with a "log messages contains NULL" error, strace said it was trying to run a command that looked like

   svn >/tmp/6639002b19 2>&1 commit -F /tmp/6639001b19   Hello.pm

which isn't going to work, it's clobbering the file it's using for the commit message. So I downloaded v.11 trial to see if that had the same problem, and it looks like it's fixed in v.11, though I couldn't see any relevant difference in the macro files.

Then I was getting all excited about v.11 and was exploring features.  I saw the "commit sets" bit and used that for the first time.  Unfortunately, though you can put a bunch of files into a commit set, slickedit sends them to svn as separate commits instead of as a bunch.  With the focus svn has on all-or-nothing transactions, there's no reason not to run commit on the whole bunch at once.  It looks like _CVSCommand in cvsutil.e was built that way. Now my boss is going to yell at me for sending through a half-dozen files as separate commits instead of bunched into a single rev   :( 

Regarding history, as of the last time I was aware there is no way to track through the branches other than using a "best-guess" algorithm which is horribly inefficient (believe me, I tried).  Based on my timings, I think that this is probably how Tortoise does this, but that is just a guess.  It may works ok on a smaller code base, but on a converted version of our code base it took nearly an hour to get a complete history for a file.  Subversion is supposed to be putting in some better support for this, and when it is available we will support it as soon as possible.

The problem with the temp filename was definitely fixed.  I believe it was fixed in 10.0, but it may have been after the last patch.  If you need this fix for 10.0 and you already have the 10.0.2 patch please let me know and I will get you a 10.0 version of the fix.

Regarding commits, I have logged a bug for this.  This is obviously one of the items that does not transfer from CVS well.  My biggest concern about fixing this is that there is a limit on the length of a command line, and it varies from OS to OS.  So a very large commit set could fail or have to be split.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2389
  • Hero Points: 133
Re: SlickEdit plus Subversion
« Reply #10 on: July 17, 2006, 03:15:29 pm »
I currently use the SVN support within Slickedit only for diffs.  I perform all other commands from the command line.
Is there something you need to work differently, or is the diff just what you are the most likely to use?

kgoess

  • Community Member
  • Posts: 10
  • Hero Points: 1
Re: SlickEdit plus Subversion
« Reply #11 on: July 18, 2006, 05:13:04 pm »
(Sorry for the late response, I just now figured out how your forum notifications work)

> Regarding history, as of the last time I was aware there is no way to track through the branches other than using a "best-guess"
> algorithm which is horribly inefficient (believe me, I tried).  ... It may works ok on a smaller code base, but on a converted version of
> our code base it took nearly an hour to get a complete history for a file.  Subversion is supposed to be putting in some better support for this,
> and when it is available we will support it as soon as possible.

Tell me if I'm totally off base here, but I was hacking Trac a little bit and was looking at their python implementation of this stuff.  The svn header files define this:

http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_repos.h?view=markup
in svn_repos.h (part of the subversion-devel package), function svn_repos_get_logs3
* If discover_changed_paths, then each call to receiver passes a
 * hash mapping paths committed in that revision to information about them
 * as the receiver's @a changed_paths argument.

so it looks like the svn_repos_get_logs function allows you to specify a "discover_changed_paths" parameter that will follow the changes backwards.

Then if you look at the trac source code (sorry, we're using an old version and it's been heavily refactored since then):
http://trac.edgewall.org/browser/trunk/trac/Log.py?rev=800
look at the definitions for get_info and the callback function log_receiver

I think that's the way to track through the branches without using a "best-guess" algorithm.  And it seems pretty efficient. Isn't that right?

Sorry, I'm at work right now or I'd put together a code snippet.  The part of SlickEdit that does this is in compiled C code, not in the macros, right?

kgoess

  • Community Member
  • Posts: 10
  • Hero Points: 1
Re: SlickEdit plus Subversion
« Reply #12 on: July 18, 2006, 05:25:55 pm »
> Regarding commits ...my biggest concern about fixing this is that there is a limit on the length of a command line, and
> it varies from OS to OS.  So a very large commit set could fail or have to be split.

If you can write the filenames to a temp file, you can call svn commit with the -F <tempfilename> flag.  I was looking into doing that, but I didn't see an obvious way to open a plain old file for writing in Slick-C.

 

kgoess

  • Community Member
  • Posts: 10
  • Hero Points: 1
Re: SlickEdit plus Subversion
« Reply #13 on: July 18, 2006, 05:35:42 pm »
> The part of SlickEdit that does this is in compiled C code, not in the macros, right?

Doh!  Now I see it in subversion.e.

Why don't you just take out the --stop-on-copy flag?  I think that's exactly what I wanted.  I'll try it let you know if that doesn't work.

The commit sets is still an issue, FYI.

pvonkaenel

  • Senior Community Member
  • Posts: 211
  • Hero Points: 6
Re: SlickEdit plus Subversion
« Reply #14 on: July 19, 2006, 11:37:59 am »
I currently use the SVN support within Slickedit only for diffs.  I perform all other commands from the command line.
Is there something you need to work differently, or is the diff just what you are the most likely to use?
It might just be a throwback to Slickedit 10 when I last tried working with the Subversion integration.  From what I remember the history display wasn't very useful and sometimes mangled the comments.  I would like to see the checkin owner along with the revision on the main history page.

I also couldn't figure out how to use the commit sets and wasn't willing to experiment and mess things up for the other project members.  Note that I only use Subversion for one project that I work on part time.  For all other projects I use a different source control system that is based on SCC which has good Slickedit support.

Peter