Multi-line commit message in Windows?
John Arbash Meinel
john at arbash-meinel.com
Mon Jan 26 16:22:16 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul Moore wrote:
> 2009/1/26 Adrian Wilkins <adrian.wilkins at gmail.com>:
>> This seems to be a deficiency of the DOS command interpreter (cmd.exe)
>> and not the Windows console per-se... for my Python-flavoured install,
>> Powershell is invoking the "bzr.bat" file in the scripts folder ; this
>> starts up an instance of cmd.exe just to run the batch file and is
>> probably the reason it's being trimmed.
> [...]
>> Instead if you add a Powershell script (bzr.ps1) to the scripts folder,
>> this takes precedence on the PoSH PATH, so you can do multi-line
>> messages at the command line. I'd imagine the exe-flavoured version just
>> works properly from PoSH.
>
> I seriously also recommend *not* using .bat file wrappers [1]. They
> have some serious deficiencies for anything beyond trivial use.
> Example:
>
> I write a .bat file to run an automated build
>
> build.bat
>
> @echo off
> bzr pull
> make
> ... put the built executable somewhere
>
> ---
>
> Result - the build does not happen!!! The reason is that .bat files DO
> NOT nest. If you call a .bat file from another, control is transferred
> to the second .bat file, and never returns. And with .bat file
> *wrappers* you don't know it's a .bat file.
>
> I got hit by precisely this problem once, and it took a long time to
> work out why my automatically built distribution was so out of date...
>
> To get round this, you have to use the CALL statement. But who's ever
> going to remember that you need to use "CALL bzr ..." in a batch
> file???
>
> If Bazaar needs a wrapper, I'd suggest writing it in Python (and
> compiling it via py2exe into an exe) or a simple C program. Better
> still, write the main driver so that it doesn't need a wrapper.
>
> Paul.
>
> [1] Is the bat file wrapper new? I still have Bazaar 1.9, and it's
> using an exe file.
>
>
You can usually use "call bzr.bat pull"
or something along those lines to use a bat file from within a bat file.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkl94zgACgkQJdeBCYSNAAPjqQCgop+hIoeZVWZ5xRsS+SDbCp07
bTYAoJb1bUHOt1DgFvbJSKeyr+ojbNIA
=MM2C
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list