Multi-line commit message in Windows?

Paul Moore p.f.moore at gmail.com
Mon Jan 26 11:08:49 GMT 2009


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.



More information about the bazaar mailing list