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)
Related
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 .
Please can someone guide me through a process here?
I'm a bit of a newb in Mercurial so I'll post a pic to be more specific.
Here's the tree of our repo right now:
We have 2 branches: processors and extra libraries.
We created extra libraries after processors to test certain issues. Then we closed it and continue working on processors.
Now it occurred the need to change back to extra libraries in #645 to push some new stuff for testing. Is this possible now? and how can I do it with TortoiseHG?
Thanks in advance!
PS: Sorry for the silly question but I want to be very careful on this repo..
Closed branch is usual branch, which just have some additional meta-info in branch-head.
If you want to "reopen" closed branch, you have
Update to head's changeset (645)
So some (needed) changes in working dir and commit: changeset 658 will be new head of active named branch, tip of repository and closed named branch will become open
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.
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.
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