Amend does not automatically refresh working directory

Ruslan Yushchenko avatarRuslan 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 (4)

  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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.