You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Josh Blair <jo...@gmail.com> on 2007/06/05 05:04:01 UTC

Trying to use EditPadPro for my SVN_EDITOR

Hello,

I tried making EditPadPro.exe my SVN_EDITOR using the following command line
set command on WinXP SP2:

set /P SVN_EDITOR=
C:\Progra~1\JGsoft\EditPadPro6\EditPadPro.exe

 but when I try to do a 'svn commit', the EditPadPro.exe editor pops up as
expected and I save my comments, close the svn-commit.tmp file after adding
my comments like this:

===================

- added unnecessary comment to test the SVN_EDITOR environment variable
being set to EditPadPro.exe
- removed the .user file from source control
--This line, and those below, will be ignored--

M    Program.cs
D    HFXMLImporter.csproj.user

===================

...and the svn commit displays the following message:

==================

C:\Projects\HFXMLImporter\HFXMLImporter>svn commit

Log message unchanged or not specified
a)bort, c)ontinue, e)dit

If I set the SVN_EDITOR environment variable back to notepad.exe, everything
works properly.

Any ideas?  Would it be the default encoding of EditPadPro or something like
that?

Thanks,

-- 
Josh Blair
Golden, CO

Re: Trying to use EditPadPro for my SVN_EDITOR

Posted by Josh Blair <jo...@gmail.com>.
Ryan, Ulrich,

You guys were right again.  I contacted the developer of EditPad Pro for
assistance.  He is always quick to reply and very helpful.  The editor does
act like a wrapper and can be configured to stay running in the background.
I use this configuration because it is multi-tabbed and I can have multiple
files open at once.

Here is the reply from the developer:

EditPad Pro does not use a wrapper, but it does behave like one if there's
> already an instance of EditPad Pro running.  Then the new instance will
> simply tell the old instance to close the file, and quit.  You can force
> the new instance to start by specifying the /newinstance parameter on the
> command line.  If SVN happens to start the first EditPad Pro instance,
> you'll need to use File|Exit to shut it down, as the X button will only
> hide it.  If you want the X button to close EditPad completely, you can
> disable the tray icon in Options, Preferences, System.
>
> Kind regards,
> Jan Goyvaerts
>

So Ryan, as you recommended, I created a simple batch script that calls the
editor with a switch [/newinstance] and then forwards on the remaining
arguments.  This switch tells the editor to "force
the new instance", otherwise you get the behavior that I described in my
first message.

Here is the content of the batch script which I named myeditor.cmd and saved
in my PATH:

C:\Progra~1\JGsoft\EditPadPro6\EditPadPro.exe /newinstance "%*"

Hope this helps someone else, and thanks again for your assistance.

-- 
Josh Blair
Golden, CO
<jo...@gmail.com> <jo...@gmail.com>

On 6/4/07, Ryan Schmidt < subversion-2007b@ryandesign.com> wrote:
>
> On Jun 5, 2007, at 00:04, Josh Blair wrote:
>
> > I tried making EditPadPro.exe my SVN_EDITOR using the following
> > command line set command on WinXP SP2:
> >
> > set /P SVN_EDITOR=
> > C:\Progra~1\JGsoft\EditPadPro6\EditPadPro.exe
> >
> >  but when I try to do a 'svn commit', the EditPadPro.exe editor
> > pops up as expected and I save my comments, close the svn-
> > commit.tmp file after adding my comments like this:
> >
> > ===================
> >
> > - added unnecessary comment to test the SVN_EDITOR environment
> > variable being set to EditPadPro.exe
> > - removed the .user file from source control
> > --This line, and those below, will be ignored--
> >
> > M    Program.cs
> > D    HFXMLImporter.csproj.user
> >
> > ===================
> >
> > ...and the svn commit displays the following message:
> >
> > ==================
> >
> > C:\Projects\HFXMLImporter\HFXMLImporter>svn commit
> >
> > Log message unchanged or not specified
> > a)bort, c)ontinue, e)dit
> >
> > If I set the SVN_EDITOR environment variable back to notepad.exe ,
> > everything works properly.
> >
> > Any ideas?  Would it be the default encoding of EditPadPro or
> > something like that?
>
> You'll have to ask the authors of EditPad Pro, but I suspect that the
> parameters it accepts on the command line are not the same (or at
> least not in the same order) that Subversion sends them, or maybe you
> need to send some additional EditPad Pro-specific arguments.
>
> For comparison: to use TextWrangler as my editor on my Mac, I set
> EDITOR=editor.sh and I wrote editor.sh as follows:
>
> #!/bin/sh
> edit +1 --wait --resume "$@"
>
> The first line identifies this as a Bourne shell script. In the
> second line, "edit" opens TextWrangler, "+1" tells it to select the
> first line of the opened file, "--wait" tells the terminal to wait
> until TextWrangler saves and closes the file before proceeding, "--
> resume" tells TextWrangler to switch back to the terminal when the
> file is saved and closed, and "$@" passes along to TextWrangler all
> the arguments passed to editor.sh, which would be the filename. Maybe
> you need to make a similar wrapper script (but tailored to EditPad
> Pro's needs, whatever those might be).
>
>
>


<jo...@gmail.com>

Re: Trying to use EditPadPro for my SVN_EDITOR

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 5, 2007, at 00:04, Josh Blair wrote:

> I tried making EditPadPro.exe my SVN_EDITOR using the following  
> command line set command on WinXP SP2:
>
> set /P SVN_EDITOR=
> C:\Progra~1\JGsoft\EditPadPro6\EditPadPro.exe
>
>  but when I try to do a 'svn commit', the EditPadPro.exe editor  
> pops up as expected and I save my comments, close the svn- 
> commit.tmp file after adding my comments like this:
>
> ===================
>
> - added unnecessary comment to test the SVN_EDITOR environment  
> variable being set to EditPadPro.exe
> - removed the .user file from source control
> --This line, and those below, will be ignored--
>
> M    Program.cs
> D    HFXMLImporter.csproj.user
>
> ===================
>
> ...and the svn commit displays the following message:
>
> ==================
>
> C:\Projects\HFXMLImporter\HFXMLImporter>svn commit
>
> Log message unchanged or not specified
> a)bort, c)ontinue, e)dit
>
> If I set the SVN_EDITOR environment variable back to notepad.exe,  
> everything works properly.
>
> Any ideas?  Would it be the default encoding of EditPadPro or  
> something like that?

You'll have to ask the authors of EditPad Pro, but I suspect that the  
parameters it accepts on the command line are not the same (or at  
least not in the same order) that Subversion sends them, or maybe you  
need to send some additional EditPad Pro-specific arguments.

For comparison: to use TextWrangler as my editor on my Mac, I set  
EDITOR=editor.sh and I wrote editor.sh as follows:

#!/bin/sh
edit +1 --wait --resume "$@"

The first line identifies this as a Bourne shell script. In the  
second line, "edit" opens TextWrangler, "+1" tells it to select the  
first line of the opened file, "--wait" tells the terminal to wait  
until TextWrangler saves and closes the file before proceeding, "-- 
resume" tells TextWrangler to switch back to the terminal when the  
file is saved and closed, and "$@" passes along to TextWrangler all  
the arguments passed to editor.sh, which would be the filename. Maybe  
you need to make a similar wrapper script (but tailored to EditPad  
Pro's needs, whatever those might be).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Trying to use EditPadPro for my SVN_EDITOR

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Tuesday 05 June 2007 07:04, Josh Blair wrote:
> I tried making EditPadPro.exe my SVN_EDITOR using the following command
> line set command on WinXP SP2:
>
> set /P SVN_EDITOR=
> C:\Progra~1\JGsoft\EditPadPro6\EditPadPro.exe
[..]
>  but when I try to do a 'svn commit', the EditPadPro.exe editor pops up as
> expected and I save my comments, close the svn-commit.tmp file after adding
> my comments like this:
[...]
> ...and the svn commit displays the following message:
> C:\Projects\HFXMLImporter\HFXMLImporter>svn commit
>
> Log message unchanged or not specified
> a)bort, c)ontinue, e)dit
>
> If I set the SVN_EDITOR environment variable back to notepad.exe,
> everything works properly.

If you run notepad from the commandline, it starts the process and then 
returns to the commandline, which you can prevent with 'start /wait notepad'. 
This behaviour is AFAIK standard for all windows applications (as opposed to 
console applications) under MS Windows. If EditPadPro behaves differently, I 
guess that the executable is in fact only a wrapper that starts the real 
editor and then terminates. You will have to ask the vendor of that tool 
if/how you can wait.

> Would it be the default encoding of EditPadPro or something like that?

The default encoding probably has nothing to do with it.

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Ronald Boers, Amtsgericht Hamburg HR B62 932

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org