Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show status and diffs of current commit as compared with immediate ancestor #157

Open
melink14 opened this issue Aug 8, 2020 · 7 comments

Comments

@melink14
Copy link

melink14 commented Aug 8, 2020

When I'm working on a feature bookmark, I will amend often while developing before sending the final version of the commit off for review.

Right now the extension only shows uncommitted files and diffs but it would also be useful to see the already committed files in draft commits when compared with their immediate ancestor.

@hdpoliveira
Copy link
Collaborator

Hi @melink14,
We have 'Hg - Log...' commands which do what you are requesting. You can explore any commit on current branch/default branch/entire repository and check what files have been modified and the modifications with respect to their immediate ancestor.

@melink14
Copy link
Author

Thanks for the response and your recent work on the extension! I had to play with it a bit but was able to understand fairly quickly. I wouldn't have thought to look there since I was associating the features with different commands than log. This should be fine 90% of the time so the rest is just stretch goal ideas.

It'd be nice if a reasonable log view could always be present in the UI though maybe that would require something like 'Git lens' and is out of scope.

Right now I keep a terminal window open with an auto refreshing custom git log command for understanding the shape of my changes. I wonder if we could use the newish terminal link handler API to allow clicking on commits from terminal log commands. That would probably still be faster than crafting st and diff commands manually.

If the graph of commits isn't linear it is harder to see the topology from the Hg - Log output. That's pretty hard to do though and once again git has a completely separate extension for it (Git Graph)...

This got a bit tangential so we can close this given the original question was answered. Thanks!

@melink14
Copy link
Author

One other comment: Before a push/PR I usually want to do a final check of my commit. The flow of having to run the log command and click twice for each file in the commit is a but cumbersome though I'm not sure if it's possible to open all the diffs at once via a command...

@hdpoliveira
Copy link
Collaborator

@melink14 would it be beneficial to your flow to add a "View all" or "Open all changes" in the hg log commit menu? (I'm not sure this can be implemented, but I have experienced this difficulty as well)

@melink14
Copy link
Author

Yeah, something like that would definitely reduce the pain. (sorry for the late reply)

I also was thinking about the larger problem of losing context as soon as one commits again and was wondering if a way to specify relative revset would be useful, especially in the case where the source panel is otherwise empty due to no working changes.

  • Add an option to make commands relative to parent if there are no working changes. This could be extended to a general command that just took a revset for adding to log/diff commands but generally I want to go to last commit or last bookmark...

@cantonios
Copy link

Sweet! I didn't know Hg - Log... was here.

I usually have a similar workflow, where I continuously amend a draft commit and want to double-check compared to the immediate parent. The hg log does provide a work-around, though is a bit cumbersome, particularly if there are multiple files. Ideally we would be able to set a specific commit to compare to for the Source Control view.

@parren
Copy link

parren commented Mar 18, 2023

Taking a stab at this.

parren added a commit to parren/vscode-hg that referenced this issue Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants