[issue1976] shrink-revlog.py fails on Windows

Pascal Quantin bugs at mercurial.selenic.com
Thu Jan 7 21:17:24 UTC 2010


New submission from Pascal Quantin <pascal.quantin at gmail.com>:

Now that shink-revlog.py turned into an extension in revision 9d79b8f58bea,
I tried to use it on my Windows box.
It raised the following backtrace:
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.4.2+21-843f6ee6d14b+20100107)
** Extensions loaded: churn, convert, extdiff, graphlog, highlight, mq,
patchbomb, rebase, win32text, svn, shrink
Traceback (most recent call last):
  File "hg", line 27, in <module>
  File "mercurial\dispatch.pyc", line 16, in run
  File "mercurial\dispatch.pyc", line 30, in dispatch
  File "mercurial\dispatch.pyc", line 46, in _runcatch
  File "mercurial\dispatch.pyc", line 464, in _dispatch
  File "mercurial\dispatch.pyc", line 334, in runcommand
  File "mercurial\dispatch.pyc", line 515, in _runcommand
  File "mercurial\dispatch.pyc", line 469, in checkargs
  File "mercurial\dispatch.pyc", line 463, in <lambda>
  File "mercurial\util.pyc", line 392, in check
  File "c:\Program Files\Mercurial\Contrib\shrink-revlog.py", line 194, in
shrink
    os.link(indexfn, oldindexfn)
AttributeError: 'module' object has no attribute 'link'

Obviously os.link is not supported on Windows. Replacing its call by
os.rename allowed to run the extension successfully.

PS: I will wait for a fix before submitting a patch to include this useful
extension in Windows installer

----------
messages: 11409
nosy: pqu
priority: bug
status: unread
title: shrink-revlog.py fails on Windows

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


More information about the Mercurial-devel mailing list