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:
Hi\~ I used this plugin with notepad++ v5.1.2 on my XP sp2. When I open notepad++,it showed “The procedure entry point RegGetValueW could not be located in the dynamic link library ADVAPI32.dll”. After confirmed that message,it pops up a box said “Load library is failed.Make “Runtime Library” setting of this project as “Multi-thread(/MT)” may cure this problem ……” . How could I solve this problem?
My CPU is P4 3.0 with HT support.
Regards, James
The function RegGetValueW, which I use to determine where TortoiseSVN is installed, is located in the DLL advapi32.dll, which apparently only ships with Vista or XP Pro x64 edition. I’ll change the code to something that supports more systems. The update should be available in the next couple of days.
I just got the same message on a similar system. I’m looking forward to this. Good luck with it. I’ll check the rss and back here. Happy new year!!
If anyone is interested, I have compiled a modified version with the correct API call which should work against 32-bit and Non-Vista systems. I have no way of testing to be entirely sure (I’m running Vista x64), but it compiles cleanly and finds the registry entry appropriately.
If anyone wants to test it out on an XP or 2000 system, drop me an email at doug at sbscomp dot com and I’ll send it to you.
Hope this is useful to someone!
I'd be very interested in a 32 bit version. I am using XP, and use NPP for all source code editing. I also use SubVersion, so would be keen to test this out.
Mike
The current version available for download will work on 32 bit systems.
I get the same problem as James - is there a download location for the fix for that?
Actually it may be a different error - I get:
Load Library is failed. Make "Runtime Library" setting of this project as "Multi-threaded(/MT)" may cure this problem.
This plugin is not compatible with current version of Notepad++
I am running npp v5.3.1
I’ve updated the download link to a new version, which incorporates Doug’s source. I’ve also added some new features. I’ve modified the post to describe them. Thanks for the feedback!
It does work perfectly on my XP now \~\~ Thanks very much.
I have installed the plugin with NPP v5.1.3 Unicode and it works as advertised - Kudos!!!
My question: Is it reasonable to request that you consider doing up an NPP v5.1.x ANSI version of your SVN plugin?
I am requesting this as Jens is buried with other activities. So much so that he is not going to be able to port his Function List v2 plugin over to Unicode any time soon. The v2 Function List Plugin is a big part of what makes NPP so useable for me in my operating environment (custom language for embedded micro-controllers). Regex is so brutal (;-) and I have invested a lot of time in the creation of parsing rules for same. So much so that I am uncomfortable not leveraging my efforts in my daily use of NPP.
So, if you would be so kind to consider porting your plugin over to the latest ANSI NPP versions, it would be greatly appreciated. Thank you, in advance, for your time.
Donations will definately be considered for same.
Regardless of your decision, thank you for your time and effort. It is much appreciated!
-t
There is the Explorer plugin (NOT the LightExplorer). Among other things it gives you access to the standard Windows Explorer context menu for files and folders. That’s what I use to issue TortoiseSVN commands from Notepad++.
I just tried installing this into Notepad++ v5.0.3, but all that shows up on my Plug-Ins menu is an "S" for this item. The submenu then only has "Crtl+Alt+Shift+Unlisted" and if I click on that Notepad++ crashes with the following error:
An exception occured. Notepad++ cannot recover and must be shutdown. The exception details are as follows: Code: 0xC0000005 Type: Access violation Exception Address: 0x006F0055
The Visual Studio debugger then opens and displays lines like this:
0187DDDF ??? 0187DDE0 ??? 0187DDE1 ??? 0187DDE2 ??? 0187DDE3 ??? 0187DDE4 ??? . . .
Any ideas what is happening?
I'm running Windows XP SP2, Notepad++ v5.0.3, and TortoiseSVN 1.5.0, Build 13316 - 32 Bit , 2008/06/21 07:55:29 Subversion 1.5.0, apr 1.2.12 apr-utils 1.2.12 berkeley db 4.4.20 neon 0.28.2 OpenSSL 0.9.8g 19 Oct 2007 zlib 1.2.3
Thanks, Ryan
Nevermind. Notepad++ update checker wasn't working, so I thought I was using the lastest version, but wasn't. I upgraded and it is working great now! Thanks for this contribution!
One feature request would be to checkout directly from Notepad++. Others may not find this too helpful, but I tend to use Notepad++ to do quick updates to files in different SVN repos (and use Eclipse and Subclipse for the long-running projects), so this would be helpful.
Thanks, Ryan
This plugin isn't working for me. In the Plugins menu it just shows up as "S", and in the submenu of that there are only two entries "Ctrl+Alt+Shift+Unlisted" and blank. Selecting either of these entries causes a crash.
I am using Windows Vista 64 and Notepad++ 5.0.3.
Any ideas?
NVM, dupe of Ryan's problem.
I sure hope to find it useful - I have no idea what I'm doing with svn yet, but I used Notepad++ for all the coding I do in any language.
Thanks - I'm going to give it a shot.
-[[Neo]]
Added "add" and "diff" functionalities.
I also made the code more general and easy to change.
DLL can be downloaded here: http://www.shererim.com/downloads/NPPSvn.zip Sources here: http://www.shererim.com/downloads/NPPSvn-source.zip
Hey,
Recently I've started experiencing problems with what is otherwise a fantastic plugin, I wonder if anyone else has come across these issues and knows a fix?
When I use the keyboard shortcut for update file I get a black blob insert where the cursor is currently positioned with the letters EOT in it. Similarly, when I use the keyboard shortcut to commit a file i get another black blob, this time with the letters SOH.
However, if I use the menu to perform these actions, the plugin behaves as expected.
I've tried uninstalling and reinstalling to no avail.
Any help would be appreciated.
Cheers, Dan.
It sounds like NP++ is interpreting the keystrokes as something it's supposed to put in the document. I tried to use a combination that wasn't used by something else and wouldn't put a character in the document. Maybe the newest version of NP++ is using this character. I'll do some testing to figure it out. What version of NP++ are you using?
Thanks, I'm currently using NP v5.4 and like I mentioned I did a complete fresh install to ensure it wasn't a problem that I had created for myself. The only difference that I have made to the installation is that I told it not to use %APDATA during the installation.
Hope that helps, and thanks for your reply.
I think I found the problem. I believe you're using the keystroke control-shift instead of control-Alt. If you use control-shift, you get the EOT and SOH characters. If you use control-Alt, everything seems to work fine.
These SOH are actually special characters which were used by Unix for end of records etc. If you use ctrl+alt+a - it gives SOH which can be viewed as \^A in VI editor and be used as a field separator "\x01" in the record format of any ETL tools like - AbInitio.
let me know if you any further information / help on this.
Hi,
Can we do a comparison between the SVN version of the file and the local(edited) version of the file, via this plugin?
And also how about check-out and check-in?
Thank you very much!
win7 7232 x64 TortoiseSVN-1.6.3.16613-x64-svn-1.6.3.msi
Could not locate tortoiseSVN
i need help
I had the same problem on Vista. Just add a new string value under HKEY_LOCAL_MACHINE\Software\TortoiseSVN\ with the key name of ProcPath and the value of C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe (or wherever that executable lives).
I am sorry, can you explain in more detail?
having same problem with winxp x64
TortoiseSVN-1.6.3.16613-x64-svn-1.6.3.msi installed
The plugin uses a registry key to determine where Tortoise is installed. I've installed 1.6.3 and the key exists, so the function call requesting the registry value might not work under a 64 bit OS. Unfortunately, I don't have access to a 64 bit OS to test. I'll hunt one down and try to find the problem.
gracias, muchas gracias amigo.
Thank you so much for this plugin. Just what I was looking for!
Valentina
Gracias por el plugin desde Chiapas, Mexico (y)
My Tortoise window will not auto-close after a successful Commit using this plugin. However, a Commit from shell extension auto-closes. How can I fix this? Thanks!
p.s. I am running XP
hey i just installed the notepad++ on my vista 64 bit and when i tried to update it it shows the error of required elevation, any solution to that cuz i can't update my notepad anymore,is it a bug?? plz help me out here!
There is an bug in this plugin when runing it on Windows 7 64bit. The plugin is searching for TortoiseSVN in the fallowing key:
11:02:27,7018262 notepad++.exe 2480 RegOpenKey HKLM\Software\Wow6432Node\TortoiseSVN NAME NOT FOUND Desired Access: Read
I can confirm this, creating the ProcPath key and TortoiseSVN key under the wow group fixes the problem. It really should not be looking for the SVN path their.
Mike
Can confirm. Adding the keys to Wow6432Node fixes the error "could not locate TortoiseSVN".
Windows 7 x64
samo problem with windows seven
I installed your plugin and am currently waiting for an update to allow it to work with 64-Bit TortoiseSVN.
Same problem, need 64-bit support
when trying to update file or check in, I get a screen long message full of Chinese characters. help is much appreciate.
I am using FTP_Symchronise plugin to access my Subversion workspace, which is on different workspace.
Is there a way I can use this plugin to do commit/updates for the ftped file.
When I try to do that it looks at a different file path, is there a way I can set the path?
notepad++ current is only availabe for 32bits version, if use 64bits TortoiseSVN, it need add registry to make it running:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TortoiseSVN] "ProcPath"="C:\\Program Files\\TortoiseSVN\\bin\\TortoiseProc.exe"
All right everyone. I've finally got my hands on a 64 bit OS and fixed the bug. The post has been updated with links to the new version. The source has also been updated, however it's now a Visual Studio 2010 Beta 2 solution.
Thank you for this, google("notepad++ subversion") brought your post up right away, just what I was hoping for.
Please do not notice my English.
Congratulations for the plugin. He's great.
I am a Brazilian developer and would like to register a suggestion.
A very used in the SVN is the option to reverse (back) the content a particular file and it would be very interesting to have this option in plugin.
What do you think about it?
Best wishes,
I think it would be pretty simple to add the SVN revert functionality. Thanks for the suggestion!
Does this plugin only support the latest version of TortoiseSVN? I believe I'm using 1.4 as that's the only version currently available at my company (we've asked for them to push out the latest version to us). I'm not a developer however we use TortoiseSVN for our version control and this plugin would certainly come in handy (particularly if a few features are added in the future).
The error I'm getting when I attempt to Commit a File is:
'?????????????????????????????????????????????????' is not a working copy Can't open file '?????????????????????????????????????????????????\.svn\entries': The system cannot find the path specified.
Any help would be appreciated. I'm using the latest version of Notepad++, and I received the error with both 1.0 and 1.1 versions of the plugin. (First installed using the built-in plugin manager, then downloaded it from here and updated it).
This plugin uses Tortoise commands that have been there for a very long time. I cannot say for sure if 1.4 is supported, but I don't know why it wouldn't be. It looks to me like whatever file you're attempting to commit is not actually within an SVN repository. If you attempt to use Tortoise directly to commit the file, do you receive the same error?
I will have to revisit this to see if it is still a problem. Perhaps the issue was exclusive to the demo we were performing at the time.
Hey everyone. I've created a new version, 1.2, that provides the ability revert files.
Awesome work! Worked out of the box for me on Win7-x64. Thanks!
nice plugin - thank you. I'm on Windows 7 - 64 bit with 64-bit Tortoise. Unfortunaltey it cant see that Tortoise is installed on my system. Any chance of a fix/update. thanks from Germany
same here - windows7, 64 bit. worked fine before notepad++ prompted me to upgrade the plugin 2 days ago.
now it says 'could not locate tortoiseSVN' all the time. reinstalled, deinstalled, installed again .. can't get it to work anymore
mmm :-/ pity *-pike
(so I removed the plugin with the plugin manager, quit notepad++, and downloaded the plugin from the top of this page and put it in the plugins folder myself. it works again, and i will never update again :-) )
thanks! *-pike
I don't know why the updater thinks it needs to update. What it did was downgrade the plugin to version 1, which didn't have support for 64 bit TortoiseSVN.
Could you please implement "Add" and "Diff" as http://www.shererim.com/downloads/NPPSvn-source.zip actually did with his fork?
Awesome tool, thanks for sharing!
What license are you distributing your plugin under? Is this code open source?
Would you consider releasing your source code. Many big companies will only procure software that is distributed under a common open source license...
In win7x64 it shows version 1.0 as the latest which is having error - "Could not locate tortoiseSVN". Fixed it by manually loading the above version (1.2) to the plugins directory.
Nice plugin and thanks for sharing.
PS: how about putting some commands on a context menu, e.g. when right-clicking document or tab? Is that possible?
PPS: Could you add an option to view the log? PPPS: It's still awesome!
Great suggestions Tillster! I plan on making some revisions to the plugin soon - hopefully I can get some of those in there.
Any chance of adding the LOCK/Release LOCK functionality ?
We use the LOCK ability on several important files, and being able to lock and release that lock or commit after making changes to locked files would be a great improvement!!
Thanks Cal
I'd love if you added the "diff" and "diff with previous version" commands.
Awesome, thanks for the plugin. Works great.
FYI in NPP 5.8.5 I've added single file commit & update to the FILE (not tab, sorry) context menu by putting the following in the %AppData%\Notepad++\contextMenu.xml file:
Great plugin, thanks!
Great plugin. I've been using Eclipse for about a year but it's just too unstable and bloated. Switched to NPP & your plugin. Much more stable and fast.
Seconding Callindril, it would be sweet to have key short-cuts for lock/unlock etc. I'd like to add making the "keep lock" checkbox in the 'commit' dialogue persistent (or the option to make it so). I like to keep the lock until I'm sure the commit went OK.
ALT + CTRL + D won't upload the file for me. ALT + CTRL + C will, though.
Running 32-bit windows 7, btw.
Hate to be a bother, but you happened to choose the same shortcut for clearing results in notepad++'s Compare feature. :}
SVN overlay icons do not appear in NP++ Explorer plugin nor under Standard Menu in Explorer plugin on Win7 64bit. All latest versions of everything and SVN plugin working but these 2 issues plague me. It is fine on XP 32bit. Any ideas on how to make SVN get recognized within NP++ Explorer plugin?
Installing the 32-bit version of TortoiseSVN fixes it. It wasn't working with 64-bit version.
I added diff to the available methods - the code was very simple, just copy and paste and change a word or two.
Not sure how to submit the change back here, though.
I'd love to have that functionality, could you send me the code to zur.amit@gmail.com
thanks!
Worked a charm, nice plugin.
It would be great if it has a comparison with the previous version...
I don't get it - where do i set the URL for the first commit?
Thank you for your work on this! This has saved me a lot of time.
Hi the plugin looks great, but how can i configure it? I mean how to make it work, how to set the svn commiting? Is there any tutorial on the web how to do this?
10x in advance
This plugin uses Tortoise SVN to handle all of the commands. You'll have to use Tortoise for all of the configuration.
Hi, i would like to report a little bug. I open three files a,b and c, suppose a and b are under the version control but c is not. If I click "commit all files", a svn dialog will pop up indicating that i can commit a and b. I select those two files and commit, it will show a error message in svn dialog that c is not under the version control. In my option, c is not displayed in the commit list and why would the error message come up?
Usually, i close all the unversioned files then commit, but sometimes i used some temporal file to store some codes or logs, i need those information for later use.
u can contract me with my email address changhaoyufish@qq.com
Use it and it works awesome. Thanks for improving my worflow :)
Any Chance to get that for ANSI ?