1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #3381 open

Locked folders/files on Windows (again)

Marc Schlaich
created an issue

I'm seeing again the issues reported in #1783, this is probably a regression from the workaround in 1a5ee1cd1490 (see #3298).

Comments (8)

  1. Yuya Nishihara

    TortoiseHg has several chdirs and some of them are unsafe. They should be removed at some time, but it's tough to change the global state.

    And even if chdirs are removed, you can start the TortoiseHg process on USB drive.

  2. Marc Schlaich reporter

    Issue still present on 3.2.4.

    This is 100% reproducible by cutting and pasting a repository:

    • open repository in thg
    • cut the repo folder
    • try to paste it somewhere else

    Explorer error: folder in use

    thgw.exe has handles open to the repo fodler and the .hg and .hg\store subdirectories.

  3. Yuya Nishihara

    On Windows, IIRC, the current-working directory of the running process can't be removed. It is the limitation of Windows, don't do it.

    The problem is that the current-working directory was changed to the repository root, and it still remains after the repository was closed by thg.

  4. Log in to comment