Commit a single directory automatically adds files.

Issue #381 resolved
Jason McKesson
created an issue

Normally, when you commit from the root of the repository, files that were not explicitly added are not checked in the list of potential files to commit. This behavior does not carry over to directory commits; these will default to having all files in that directory checked, even if they were not explicitly added before the commit.

Comments (4)

  1. Steve Borho
    • changed status to open

    If you had selected an unversioned file in Explorer and opened the commit dialog for it, would you expect the file to be checked? I know I would.

    It's the same effect, recursively, when folders are selected

  2. Jason McKesson reporter

    No, I wouldn't; because, it's an unversioned file. I would expect that there would be a checkbox, but the box wouldn't be checked.

    It's an inconsistency any way you look at it. If I click on a directory that just so happens to be the root directory, then it doesn't check unversioned files. Why is the root directory treated so differently for commits? Either it should always add unversioned files or never do it. It shouldn't be "only when the directory happens to not be the root."

    This wasn't the TortioseHg 1.x behavior, and it's a bit of a surprise when going to 2.0.

  3. Steve Borho

    What happened is that the "quickop" dialog that handles shell requests for add/remove/forget/revert was implemented in 2.0 as a status based widget; allowing you to see file contents and to use all of the context menus that are available in the status and commit tools.

    Because of that, the status widget always selects files that are matched by patterns given on the command line. (If you select an unknown file in Explorer and then 'add', you do want the file checked). This logic needs to be improved for the commit case.

  4. Log in to comment