How can I examine a changeset in mercurial without looking up its parent? In mercurial, what's the equivalent of
git show HEAD^
Git-show gives the changeset metadata and the diff as well.
A changeset (sometimes abbreviated "cset") is an atomic collection of changes to files in a repository. It contains all recorded local modification that lead to a new revision of the repository. A changeset is identified uniquely by a changeset ID.
Indivisible simply means that a changeset is one single value in the stack of changes that are being made on a codebase. For example, if you look at a commit, you can check what individual files were modified, what was the previous state of the codebase and after, which would make it adhere to what a changeset is.
Use the command hg update to switch to an existing branch. Use hg commit --close-branch to mark this branch head as closed.
Your question has two parts. First, how to get the metadata and diff for a changeset all at once:
hg log --patch --rev tip
You can shorten the options:
hg log -pr tip
The second part of the question is how to say "the parent changeset of X" without looking it up. For that you can use the parentrevspec extension Martin mentioned.
Once you enable the extension you can do:
hg log -pr tip^
You could add an alias to your ~/.hgrc
file if you don't want to retrain your fingers from git's command:
[alias] show = log -pr
Then you could use:
hg show tip^
I think you want hg export cset
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With