Error when try to save settings

Issue #303 resolved
Anonymous created an issue



Please report this bug to Mercurial version (1.8). TortoiseHg version (2.0) Command: --nofork workbench CWD: D:\FEKN\AA-Studium\master\0AA-Thesis\svn\catroweb\web Extensions loaded: fixfrozenexts Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] Windows version: (6, 1, 7600, 2, '') Processor architecture: x64 ** Qt-4.7.1 PyQt-4.8.2 Traceback (most recent call last): File "tortoisehg\hgqt\commit.pyo", line 764, in saveInRepo File "tortoisehg\hgqt\commit.pyo", line 786, in saveToPath File "tortoisehg\util\wconfig.pyo", line 244, in writefile File "mercurial\util.pyo", line 842, in rename File "mercurial\windows.pyo", line 343, in rename File "mercurial\windows.pyo", line 319, in unlink WindowsError: [Error 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird }}}

Comments (6)

  1. Anonymous

    I tried the following:

    deleted my local repository and cloned once more. Now it WORKS!

    Thank you guys for that brilliant work!

  2. Adrian Buehlmann
    • changed status to open

    Thanks for reporting the bug.

    Developer chatter follows below.

    It looks like tortoisehg/util/ might try to write to files which are held open using python's open() function.

    This doesn't work:

    We should strive to use mercurial.util.posixfile, which allows to rename an open file, or make sure the files are closed quickly after they have been read.

    I currently fail to see how tortoisehg/util/ works exactly, but I see some fishy fp object references in the source.

    On a related note, I'll see if I can convince Matt to take

    diff --git a/mercurial/ b/mercurial/
    --- a/mercurial/
    +++ b/mercurial/
    @@ -138,5 +138,5 @@ class config(object):
         def read(self, path, fp=None, sections=None, remap=None):
             if not fp:
    -            fp = open(path)
    +            fp = util.posixfile(path)
             self.parse(path,, sections, remap,

    But I fear he'll want to see a proof that this fixes bug before he'll take it for stable (Looks like another 4 month round trip is in order :-()

  3. Log in to comment