Notepad++ Subversion Plugin

Lately I’ve been doing a lot of work with Notepad++ and Subversion, however I was surprised to find that there are no plugins available that integrate the two. At least, no plugins Google could easily find for me. Due to the nature of my project, a lot of commits are required, and I was wasting a lot of time switching between Notepad++ and Windows Explorer in order to commit changes. Being a software engineer, I figured out a good solution: I’ll write my own Subversion plugin for Notepad++.

Notepad++ has a good plugin system, however it’s very poorly documented. I relied mostly on looking at the source code for plugins that shipped with the application in order to figure out how to do things. Maybe there’s a mystical page somewhere full of explanations and examples, but I definitely missed it.

In this first version, I implemented the basic update/commit commands that I needed for my own development. Depending on whether or not anyone else finds this plugin useful, or if I find extra time, I might slowly expand the features.

The plugin simply uses the command line features of TortoiseSVN, so you’ll have to install it before the plugin will work.

Update: January 3rd, 2009

I incorporated some code sent to us by Douglas Phillips, which opens the plugin up to more systems than just Windows Vista. It now definitely works under Windows XP. I also added the ability to Commit and Update all opened files, instead of just the currently visible one.

Update: November 29th, 2009

As a lot of people discovered, version 1.0 of this plugin didn’t work with the 64 bit version of TortoiseSVN. This was because Notepad++ is only available as a 32 bit application, which caused Windows to redirect its registry requests to a different key. Therefore, it could not determine where Tortoise was installed. The fix was very simple and a new version has been created that addresses the bug. Thanks to everyone that reported the error and especially those who posted fixes in the comments.

Update: February 17th, 2010

The user, ursolouco, requested what is essentially the ability to revert. So I’ve created a new version (1.2) that adds this functionality. Just like with update and commit, you can revert either your current file or all opened files.

Installation Instructions

Make sure TortoiseSVN is installed and you’ve installed the latest version of Notepad++.

The plugin comes in the form of a zipped, dll. Simply unzip the dll and place it in the Notepad++ plugins directory. For a typical install, it will be located here: “C:\Program Files\Notepad++\plugins”. Next time you launch Notepad++, the plugin will automatically be loaded.

The plugin should work under Windows XP, Vista, and 7. Both 32 bit and 64 bit operating systems are supported. If you find any bugs on these systems or others, drop a comment and I’ll see if I can address them.

I’ve noticed that sometimes Notepad++’s auto-updater thinks the plugin needs to be updated. This usually results in a new version being overwritten by version 1.0. If you update to 1.1 or 1.2, do not use Notepad++’s auto-update feature when it prompts you for this plugin.

If you’re interested in the source code for this plugin, you can download a Visual Studio 2010 RC project below.

Source Files:

 

source:http://tech.pro/blog/870/notepadplusplus-subversion-plugin

About 智足者富

http://chenpeng.info

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>