[issue1366] hg mv -f aborts when moving read-only files on windows

Peter Ruibal mercurial-bugs at selenic.com
Wed Oct 29 12:14:48 CDT 2008


New submission from Peter Ruibal <ruibalp at gmail.com>:

I get the following traceback when trying to move a file that has been marked
with the "Read Only" attribute in windows:

C:\Documents and Settings\Administrator\src\test-hg-convert\src_repos>hg mv -f 
--traceback tc1-simple\ReadOnly tc01-simple\ReadOnly
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\mercurial\dispatch.py", line 45, in _runcatch
    return _dispatch(ui, args)
  File "C:\Python25\Lib\site-packages\mercurial\dispatch.py", line 367, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "C:\Python25\Lib\site-packages\mercurial\dispatch.py", line 420, in
_runcommand
    return checkargs()
  File "C:\Python25\Lib\site-packages\mercurial\dispatch.py", line 376, in checkargs
    return cmdfunc()
  File "C:\Python25\Lib\site-packages\mercurial\dispatch.py", line 359, in <lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "C:\Python25\Lib\site-packages\mercurial\commands.py", line 2297, in rename
    return cmdutil.copy(ui, repo, pats, opts, rename=True)
  File "C:\Python25\Lib\site-packages\mercurial\cmdutil.py", line 510, in copy
    if copyfile(abssrc, relsrc, targetpath(abssrc), exact):
  File "C:\Python25\Lib\site-packages\mercurial\cmdutil.py", line 376, in copyfile
    os.unlink(target)
WindowsError: [Error 5] Access is denied: 'C:\\Documents and
Settings\\Administrator\\src\\test-hg-convert\\src_repos/tc01-simple/ReadOnly'
abort: Access is denied: C:\Documents and
Settings\Administrator\src\test-hg-convert\src_repos/tc01-simple/ReadOnly

Issue 583 might have some ideas.

----------
messages: 7703
nosy: fmoo
priority: bug
status: unread
title: hg mv -f aborts when moving read-only files on windows

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



More information about the Mercurial-devel mailing list