Author Topic: Git Manager [EDIT:BUGFIX 2]  (Read 7224 times)

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Git Manager [EDIT:BUGFIX 2]
« on: November 04, 2009, 11:30:23 am »


Being fed up with trying to get SE's native version control support to work, I just rolled my own. It should all be pretty self explanatory. Load git.e and gitmanager.e. The command 'rungitmanager' runs a gui where you can set up support for your project, and commit or reset changes, and get diffs of modified files. It's simple, and only supports the features I use regularly, that is, "woo! commit!" and "well, that was stupid. roll back!".  :P

git-log loads up the results of a git log into a temp file and opens it, and there's another command that pops up a message box telling you how many modified files the current project has (but git manager tells you this anyway).

It all works on the assumption that you have an open project. You can set up a path to the git executable, and a path to the git repository root (which can be relative to your workspace file), otherwise it just assumes git is on your PATH and your repository is in the same directory as your workspace file.

I'm sure there are bugs. If you find one, or find it useful, let me know. Hopefully it shouldn't wipe out the contents of your hard drive, but no promises.  ;)

Enjoy!

EDIT: Oh! I wrote this for 13.0.2.0, but it should hopefully work fine on older/newer versions. Let me know.

BUGFIX1: Fixed bug where SlickEdit would segfault through use of _insertel on a large list of modified files.
BUGFIX2: (it's more of a pre-emptive bugfix, really) Use mktemp to generate temp paths.
« Last Edit: November 04, 2009, 11:54:53 pm by Bhelyer »

Kohei

  • Senior Community Member
  • Posts: 192
  • Hero Points: 25
Re: Git Manager [EDIT:BUGFIX 2]
« Reply #1 on: December 16, 2009, 03:34:19 am »
Hey, nice work. :-)  I just tried it in the latest SlickEdit and it works like a charm!

Diff support with git was badly needed, so I'm glad to see someone implemented this.  As someone who lives git everyday this makes a world of difference for my day-to-day coding.

Kohei

Kohei

  • Senior Community Member
  • Posts: 192
  • Hero Points: 25
Re: Git Manager [EDIT:BUGFIX 2]
« Reply #2 on: December 16, 2009, 03:45:55 am »
The only place I would change is to flip the views of the files in vsdiff, to have current buffer on the left hand side.  I just modified the line that launches the diff window to
Code: [Select]
diff(nls("-modal -r2 %s %s", filename, previousRevisionPath));
to achieve it.

Bhelyer

  • Community Member
  • Posts: 29
  • Hero Points: 3
Re: Git Manager [EDIT:BUGFIX 2]
« Reply #3 on: January 03, 2010, 09:37:46 pm »
Hi,
I'm very pleased to see someone else finds this useful! I have a version on my hard-drive with a few new features which I should probably finish. :)

Regarding the diff order, that's interesting -- I prefer to have the older version of the file on the left and the newer version on the right. Do you think it's worth adding a preference?

erezzi

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Git Manager [EDIT:BUGFIX 2]
« Reply #4 on: July 07, 2010, 11:25:51 am »
Sorry for the stupid question - how do you run it? Where should I run the command "rungitmanager" from?

Thanks,
Erez

Graeme

  • Senior Community Member
  • Posts: 1987
  • Hero Points: 228
Re: Git Manager [EDIT:BUGFIX 2]
« Reply #5 on: July 08, 2010, 12:34:42 pm »
Sorry for the stupid question - how do you run it? Where should I run the command "rungitmanager" from?

Run it from the slickedit command line - with CUA emulation you can press escape to get to the command line or click on the status bar area.  Then just type rungitmanager.  You can also bind a key to it using the key bindings dialog.