[issue1012] hg rename acts strange, executes files

Wolfgang Lipp mercurial-bugs at selenic.com
Sat Mar 1 18:37:06 CST 2008


New submission from Wolfgang Lipp <paragate at gmx.net>:

hi,

i tried to rename a file whose name starts with an `S` with same name using
lower case. this fails with
presumably hg saying "not overwriting - file exists".

so, try to rename `S` to `s-x` to `s` (full name and extension omitted, real
name is `Shuttlepod.py`).

first step `S` to `s-x` works, but then i seemingly hit the return key a little
early and send out
`hg rename s-x` instead of `hg rename s-x s`, omitting last argument.

next, i see first line of said file (a shebang line) on screen; this leads to
"abort: with multiple sources,
destination must be an existing directory". this, as well, should be a hg
message as my DOS (yeah i know but
skip the juicy part please) is in German language. for this very reason, i
conclude that ensuing message, an
echo of the next line in file `s-x`, comes from DOS... like the following well
over 1600 lines.. that all
are thrown into the mout of the shell that tries to execute each one and never
aborts! arrgh!

it sure is big blunder that DOS doesn't stop an invalid batch file but just goes
on trying hard. apart from
that spammy flood being hard on the eyes and wholly unnecessary, i still believe
that mercurial,
not DOS is the one to blame here.

how comes a python file gets executed when i execute `hg rename filename0`? how
comes the shell, of all
things, is called up to do that? this is a wrong and dangerous behavior.

one interesting thing: when the spamm had ebbed, i was unable to execute `hg`
anymore. a quick peek revealed
that `PATH=trailJoin( trail = trailMerge( pretrail, [ key ] ) )`, which indeed
looks a little like that
`path = ...` line in the file in question. i opened a new terminal and
forunately! this seemingly didn't
DELETE MY SYSTEM.

finally, i found there was also a file named `(` in the working directory, which
presumably also got created
by the shell trying to make sense out of python. anything could have happened.

can anyone relate to this experience? i believe it to be a bug in mercurial rename. 

greets,

_wolf

and please do consider moving this wonderful project to an acceptable hosting
solution. pipermail is definitely not something anyone will want to work on
these days. google groups is the minimum. and this tiny bug tracker change note
text area drives me nuts.

----------
messages: 5441
nosy: flow
priority: bug
status: unread
title: hg rename acts strange, executes files

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1012>
____________________________________________________



More information about the Mercurial-devel mailing list