[PATCH] convert: add commandline.xargs(), use it in svn_sink class
Maxim Dounin
mdounin at mdounin.ru
Thu Jan 10 21:54:46 CST 2008
Hello!
On Fri, Jan 11, 2008 at 06:18:08AM +0300, Maxim Dounin wrote:
># HG changeset patch
># User Maxim Dounin <mdounin at mdounin.ru>
># Date 1200020863 -10800
># Node ID 722df76e00e3f63c1163a6da15cb594ecf4b20a7
># Parent c32d41affb68e3c1c782c1ba7df93f150301323d
>convert: add commandline.xargs(), use it in svn_sink class
Some notes:
- This patch effectively changes two calls of commandline.run() into
commandline.run0() in svn_sink. This change was discussed with
Bryan O'Sullivan, run0() is apropriate.
- It also resolves possible issues under *nix identical to ones
Shun-ichi GOTO fixed for Windows.
The following test will show the problem under *nix systems
(conversion will fail without patch). I don't think this test
should be included since it actually works only if your system
have some limit on argument list (not all systems has it) and it
consumes too much time. Also I'm not sure test is portable enough.
<cut here>
hg init a
cd a
LONG=`jot -s "" -b "x" 128`
mkdir ${LONG}
ARG_MAX=`getconf ARG_MAX`
for i in `jot $((${ARG_MAX} / 128 / 2))`; do
touch ${LONG}/${LONG}${i}
chmod +x ${LONG}/${LONG}${i}
done;
hg --quiet ci -Ama
cd ..
hg convert -d svn a
<cut here>
Maxim Dounin
More information about the Mercurial-devel
mailing list