[PATCH 2 of 2] setup: call identify directly from mercurial.commands
Martin Geisler
mg at daimi.au.dk
Thu Feb 12 20:21:49 UTC 2009
Gilles Moris <gilles.moris at free.fr> writes:
> On Thu February 12 2009 00:37:05 Martin Geisler wrote:
>> + pypath = sys.path[:]
>> + sys.path.append('mercurial')
>> + sys.path.append(os.path.join('mercurial', 'pure'))
>>
>
> Why not:
> sys.path.insert(0, 'mercurial')
> sys.path.insert(0, os.path.join('mercurial', 'pure'))
> to have [ 'mercurial/pure', 'mercurial' ] in front.
> Otherwise, it takes the site-wise mpatch instead of the local pure.
Does that make a difference? The old code spawned 'hg id' and so it
would also have used the site-wise mpatch.
> BTW, I have the following traceback on my Fedora Core 5 when doing make local,
> since a1138f437640.
> Without the patch, it prints the stack trace but does not prevent the
> build. With the patch, no traceback because you catch all exceptions
> now, but otherwise, I get a similar traceback.
Hmm :-( The idea behind catching all exceptions is to make sure we label
the version as "unknown", no matter what goes wrong in the pure code.
Similarly to what happens when OSError is caught in case 'hg id' did not
work for some reason.
But the pure code should definitely work! The other patch I sent makes
the code more robust on Windows and Mac OS X, but your error occurs on
Linux and it is different...
Can you run the test suite with the pure code? Go to tests and do
./run-tests.py --pure
> python setup.py build_py -c -d . build_ext -i build_mo
> ** unknown exception encountered, details follow
> ** report bug details to http://www.selenic.com/mercurial/bts
> ** or mercurial at selenic.com
> ** Mercurial Distributed SCM (version unknown)
> ** Extensions loaded: churn, color, extdiff, graphlog, hgk, mq, nearest, patchbomb, purge, qrebase, rebase, transplant
> Traceback (most recent call last):
>
> [...]
>
> File "/home/mercurial/hg.crew/mercurial/revlog.py", line 976, in revision
> text = mdiff.patches(text, bins)
> File "/home/mercurial/hg.crew/mercurial/pure/mpatch.py", line 79, in patches
> t = collect(b2, frags)
> File "/home/mercurial/hg.crew/mercurial/pure/mpatch.py", line 57, in collect
> m.move(buf, p, l)
> ValueError: source or destination out of range
> running build_py
> ...
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20090212/cfc7506b/attachment.asc>
More information about the Mercurial-devel
mailing list