How to configure `hg push` to push to current branch only? [duplicate] - mercurial

This question already has answers here:
How to change the default branch to push in mercurial?
(3 answers)
Closed 6 years ago.
I would like to configure Mercurial to push the commits on the current branch only, instead of all draft commits - much like Git does when the push.default is set to simple. I scanned the hgrc manual page, but couldn't locate the option which enforces this. How is it called?

Although deprecated, you can set defaults for commands in hgrc:
[defaults]
push = -r .
The recommended alternative is aliases:
[alias]
pushcurrent = push -r .

Related

How can I remove a specified version of project in Hg? [duplicate]

This question already has answers here:
Mercurial Remove History
(2 answers)
Closed 2 years ago.
I want to ask a question about Hg.
You can see the picture that there is a branch from 196 to 199, and now I want to remove the branch in the server version and use the 195 as the newest version, could you please tell me how to do that?
Thank you so much!
If 196:199 was already pushed to remote, you can't delete this branch (check hg out or phases of these revisions)
If 196:199 are pure local, you can just simply hg strip not needed anymore anonymous branch
Anyway, you can:
Dummy merge r199 into r195 and continue work
Forget about branch, and continue your work from 195 (first push with new child-commit of 195 will require -f due to new head in branch)

Mercurial Queues, patch is getting auto applied [duplicate]

This question already has an answer here:
How to push just one specific patch in Mercurial Queues?
(1 answer)
Closed 6 years ago.
I have two patches:
patch1
patch2
When I apply patch1, that is the only thing that gets applied. When I do hg qpop and then do hg qpush patch2, for some reason patch1 gets applied too. How can I make them independent from each other?
You need to use the --move option for that. For example:
hg qpush --move patch2
This will apply only patch2, but not any patches on top of it.

How to undo a revert in mercurial [duplicate]

This question already has an answer here:
Are my changes gone after "hg revert"?
(1 answer)
Closed 8 years ago.
After I had accidentally added several files with
hg add
I wanted to revert that with
hg revert --all
Unfortunatelly I hadn't committed my intended changes so they were reverted as well. Can I get that content back?
You did not specify the --no-backup, so there should be backup files right next to the actual file.
Documentation to support this
Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup.

How can I make names in a mercurial revision history consistent? [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
How to deal with committer name change in Mercurial
On a new install, I forgot to set my username reasonably in my hg client. As a result, the last few commits have me listed as "Billy", rather than the "Billy O'Neal <billy.oneal#example.com>" like I have been using.
Is there a way I can change these to make them consistent?
It is possible to edit history with extensions like mq and convert, but if you have pushed the commits, you'd have to edit every clone of your repository as well. If you are a small group of users that may be possible, but otherwise it is too late.

List files that are different between two hg changesets [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Generating a list of which files changed between hg versions
hg diff -r 5 -r 10 will give the differences between revisions 5 and 10. But I want to see specifically just a list of files that are different - I don't want to see the full diffs. Is there a quick way to do this?
hg status can do this.
The main purpose of hg status is showing modified files in the working directory (in comparison to the last commit).
But you can use the --rev parameter to let it compare two specific revisions instead, like this:
hg status --rev 5 --rev 10