bzr.bat splaps all win98 users immediately in the face

Robert J. Cristel robertjcristel at sympatico.ca
Tue Feb 28 04:45:52 GMT 2006


John Arbash Meinel wrote:
> James Blackwell wrote:
> 
>>On Mon, Feb 27, 2006 at 03:08:38PM -0500, Robert J. Cristel wrote:
>>
>>>C:\Python24\Scripts>type bzr.bat
>>>@C:\Python24\python.exe C:\Python24\Scripts\bzr %*
>>>
>>>C:\Python24\Scripts>bzr.bat
>>>bzr: ERROR: unknown command '*'
>>>
>>>C:\Python24\Scripts>
>>>
>>>C:\Python24\Scripts>
>>>
>>>Why?
>>>
>>>>Windows NT 4 introduced a set of new features for command line parameters:
>>>>%* 	  	will return all command line parameters following %0
>>
>>
>>I know that Windows 2000 has it. I'm unable to verify that NT4 has it. Bzr
>>is telling you though that it got "*" for an argument, which implies to me
>>that NT 4 doesn't have the feature. I suggest that you test with this
>>standalone batch script
>>
>>test.bat:
>>  echo I got:%*
>>
>>C..> test.bat hello world
>>
>>The results may be illuminating.  By the way, newer versions of bzr have
>>command aliases which may help you out of the problem that you're in.
>>
>>Regards,
>>James
>>
> 
> 
> Actually, the problem is that he is on Windows 98, which doesn't have
> anything from the NT line. So $* is illegal in win98.
> 
> Now officially, we don't support Win9x platforms. I realize we shouldn't
> be overly hostile towards it, though.
> 
> All he is really asking is that we change our default .bat file to be:
> 
> "c:\Path\To\python.exe" "C:\Path\To\bzr" $1 $2 $3 $4 $5 $6 $7 $8 $9
> 
> (I don't believe that the Win9x batch processor can handle more than 9
> arguments).
> 
> It is a small change, and if it works for him, then we might as well do it.
> 
> That said, if we run into any other major problems (like the fact that
> Win9x support for unicode is very poor, and bzr uses unicode
> extensively), I don't expect we will do a lot of work to make bzr run on
> Win98.
> 
> Can you let us know if changing the batch file makes bzr work for you?
> Otherwise there isn't much point in adding the fix, as it then limits
> other windows people to only 9 arguments. (Which is probably sufficient
> in the common case, but still a limitation).
> 
> Oh, and probably it needs to be:
> 
> "$1" "$2" "$3"
> 
> Can you confirm that as well? I know my colleague tried to do:
> bzr commit -m 'some text'
> 
> But it turns out that the Windows XP shell doesn't treat single quotes
> as special.
> 
> (Which brings up another point, that the message 'No changes to commit'
> hides the problem, and probably when a file spec is given we should give
> 'No changes to "foo" to commit')
> 
> John
> =:->
> 
C:\Python24\Scripts>type bzr1.bat
@C:\Python24\python.exe 
C:\Python24\Scripts\bzr "%1" "%2" "%3" 
"%4" "%5" "%6" "%
7" "%8" "%9"


C:\Python24\Scripts>bzr1 help
bzr: ERROR: exceptions.IndexError: string 
index out of range
   at 
C:\Python24\Lib\site-packages\bzrlib\commands.py 
line 312
   in parse_args

C:\Python24\Scripts>
C:\Python24\Scripts>

C:\Python24\Scripts>
C:\Python24\Scripts>type bzr3.bat
@C:\Python24\python.exe 
C:\Python24\Scripts\bzr "%1" "%2"
C:\Python24\Scripts>bzr3.bat help init
usage: bzr init [LOCATION]

Make a directory into a versioned branch.

Use this to create an empty branch, or 
before importing an
existing project.

Recipe for importing a tree of files:
     cd ~/project
     bzr init
     bzr add .
     bzr status
     bzr commit -m 'imported project'

options:
     --help, -h                show help 
message

C:\Python24\Scripts>





More information about the bazaar mailing list