1. TortoiseHg
  2. TortoiseHg
  3. thg
Issue #2406 resolved

Amend does not automatically refresh working directory

Ruslan Yushchenko
created an issue

To reproduce the behavior:

  1. In TortoiseHG Workbench select a repository and click on Working Directory. Make change to arbitrary file.

  2. Select "Amend" instead of "Commit". In status window changed files will be shown.

  3. Amend the changes.

  4. Status window still shows that files are changed (need to manually click "Refresh file list" button).

The behavior have been introduced in 2.7

Comments (6)

  1. Yuya Nishihara

    Pre c72fc418608e:

    1. repositoryChanged
    2. loadSubrepos() runs another event-loop, which blocks propagation of repositoryChanged
    3. commitSetAction() exits from amend mode, and runs refreshWctx() with pctx=None

    Post c72fc418608e:

    1. repositoryChanged
    2. loadSubrepos()
    3. refreshWctx() by repositoryChanged(), still in amend mode, with pctx=changectx_obj
    4. commitSetAction() exits from amend mode, and tries to run refreshWctx() with pctx=None
    5. but it's canceled because the previous refreshWctx() is still running
  2. Yuya Nishihara

    status: postpone overlapped refreshWctx() request (fixes #2406)

    If the last refreshWctx() request is canceled, it may end with stale wctx view. Instead, this changes to merge pending requests by 10msec delay and make sure to fire the last request.

    3b53af762d7c says synchronous=True has a similar reason. So I guess this change can supersede the synchronous flag later.

    → <<cset f9061c4da5ca>>

  3. Log in to comment