Workbench Filter is excluding Working Directory line

Issue #2589 open
Steve Spencer
created an issue

In workbench, I use this revset query to help me focus on relevant branches. This means I don't accidentally do the wrong merge:

branch("default") or branch("Feature/SexUpTheUI")

This excludes other feature branches and stable/release branches, ensuring the only merges I do are from default (dev) to my feature (to keep up to date), from feature to default (to integrate), or two-headed merges.

However I can't routinely use this because it filters out the working directory. I tried this to include the working directory but it didn't work:

branch("default") or branch("Feature/SexUpTheUI") or .

Either an option, or auto-including the working directory if its parent(s) are included by the filter, would help a developer to focus only on the "world" they are currently working in.

Comments (18)

  1. Yuya Nishihara

    This is because the revset filter deeply depends on Mercurial core, and Mercurial cannot handle the fake working directory revision by revset.

    FYI, "." means the working directory parent. There's no special symbol for the working directory itself.

  2. Matt Lachman

    I have the same use case as Steve. I want to cut out the noise of the many feature branches we have and only operate within the scope of a couple branches (my current feature and default). If I can't see the working directory, this is impossible to do because I can't ever commit changes while a revset filter is active.

    Could a checkbox be added next to the revset query to also show the working directory? A preference somewhere else? I would think adding in the working directory after receiving the output from the underlying hg command would be possible somehow.

  3. Incubant

    +1 Same issue in my case, we have some heavy filters for our branch-merge strategy and most of the time the working directory is needed beside. For my case it would be better to show the working directory always than never in filter view. So a check for always show wirking directory would help.

  4. Jason Ericson

    +1 Same issue as others have mentioned. We have a lot of branches going at the same time, and the graph can get pretty overwhelming, so filters are necessary. But I would like to be able to leave the filter on indefinitely instead of constantly switching back and forth to see the working directory.

  5. Tyas Kokasih

    +1 for "illusion" of not able to commit.

    Only after some time (just now) that I realize we can switch from "Revision Details" to "Commit" view from the toolbar.

  6. Aaron Lawrence

    My use case is wanting to see multiple (but not all) branches, but still see the working directory. Just like the workbench provides now for filtering a single branch. Perhaps thats better done with a multi-select UI for the branch.

  7. DaveInCaz

    My recommendation is to ALWAYS show the working directory line item in the list. This might be a trade-off but I think overall it would be an improvement.

    Personally I find myself fighting with the UI frequently because the working dir gets hidden too often. Also I see it frequently as a pitfall for new users who use the branch selector dropdown only to find the working folder is lost and they don't know why / what to do.

    This approach would mean that underlying hg limitations would become irrelevant. The working dir line item is one call to hg, the remaining line items are some other call to hg.

  8. Aaron Lawrence

    Hm this seems true to me as well, even with the branch selector it only shows your working directory if it happens to be on the same branch. Working directory is important context in many cases

  9. Log in to comment