Where is an bisect menu in Tortoise HG?
How to use bisect from GUI?
I have version 2.10.
Or I could use bisect only from console?
There is a Bisect option in the Repository menu, or you can select two changesets and right-click to obtain the Bisect in the context menu.
Related
git bisect run conveniently bisects a given range of revisions with a script run on each revision whose exit status is used to determine whether it is good, bad or broken.
hg bisect does not seem to offer this automatic ability. I need to manually mark each revision as either good or bad. Is there an extension or script that provides a functionality comparable to git bisect run for mercurial?
Read hg help bisect by eyes. Note -c CMD option. Use it
I'm using Mercurial and after I pull changesets from a remote repo, I do a rebase (to keep it easy to sync with SVN).
If there are merge conflicts during the rebase, I need to execute hg rebase --continue after I fix them up. This isn't a big deal, but I'd like a "visual" way to do this since I'm hoping to move my teammates to Hg and the command-line is too frictious for everyone to learn.
How can I execute the continue option during a rebase using only the TortoiseHg Workbench (v 2.2) GUI?
In TortoiseHG you can do a whole rebase using GUI so you don't need to run hg rebase manually. Just right click on a revision and select Modify history->Rebase....
If you already started rebase and want to run rebase --continue via GUI, just run TortoiseHG, right click on any revision and select Modify history->Rebase.... TortoiseHG will detect the unfinished rebase and will run rebase --continue automatically.
I've recently started working with MQ as I like the idea of working on isolated patches and committing without affecting the repo until the changeset is refined enough. Before that, I used to work with Mercurial's shelves extension, but found it a bit unstable. What I'm still trying to figure out in MQ is how to keep patches separate from each other and apply them in no particular order, and across different branches. Here's my normal flow -
1. Start working on a new patch:
hg qnew fix-bug-1234 -m "fix bug 1234"
# do some work
hg qrefresh
2. Get a new feature/bug to work on:
hg qpop fix-bug-1234
hg qnew some-feature -m "implement feature X"
# some work on feature X (perhaps in a different branch)
hg qrefresh
3. At this point, I'd like to get back to working on bugfix, and put aside the feature work. I thought it's as simple as:
hg qpop some-feature
hg qpush fix-bug-1234
# wrap up bug fix
hg qfinish fix-bug-1234
# get back to work on feature
However, MQ seems to always use the latest patch created in the series, and apply it regardless of the qpop/qpush command I'm using. I should note that the files I work on are completely separate as well (though they can sometimes be the same).
Am I missing something here? Should I be using hg qqueue for this? Thanks.
You could use guards. They allow you to maintain an ordering of patches without rearranging your series file, and selectively apply only a subset of patches, still in a stack-ordered fashion.
An example in your case would be:
hg qnew bugfix
# ..hack hack..
hg qrefresh
# want to switch over to working on some feature now
hg qpop
hg qnew feature
# ..hack hack..
hg qrefresh
At this point, you're in a situation where patch feature comes before bugfix in your stack. Now you can use guards to select one or the other, and switch between the two:
hg qpop -a
hg qguard feature +featureguard
hg qguard bugfix +bugfixguard
If you want to work on feature:
hg qselect featureguard
hg qpush
applying feature
now at: feature
If you want to work on bugfix:
hg qpop -a
hg qselect bugfixguard
hg qpush
applying bugfix
now at: bugfix
Note that since you selected the positive guard bugfixguard, MQ leap-frogged over feature (because it's positive guard was different than the one selected) and applied the patch bugfix instead (which did match the selected guard).
Some useful tools when working with guards are hg qseries -v, which will display a G instead of the usual U for a guarded, unapplied patch, and hg qselect -l which will display the guards associated with each patch.
Execute hg qpop -a to remove all patches from the stack
Execute hg qpush --move some-patch to apply "some-patch" without applying whatever other patches may be before it in the patch stack
No, you aren't missing anything. The mq extension does make a pretty strong assumption that patch queues are linear. If you're going to be creating multi-patch features/fixes then qqueue would work… But if your features/fixes are just single patches and you want to be able to apply one with out applying the others, it might be easier to just re-arrange .hg/patches/series (which stores the order that patches will be applied).
I do this (and hand-editing patches) enough that I've got a shell alias:
alias viq='vim $(hg root)/.hg/patches/series'
Alternately, if you don't mind applying multiple patches at the same time, you could use qgoto:
$ hg qser
0 U bug-1234
1 U feature-4321
$ hg qgoto feature-4321
$ hg qser
0 A bug-1234
1 A feature-4321
I pulled one revision and tried to merge but hg couldn't make the merge. I know the right version is the local (or the remote...), so I do this:
hg heads
hg revert file_path --rev right_rev
hg resolve -m file_path
...
Is there an easier way to do this?
Yes I know I should open the file, verify, manually resolve, bla bla bla
With newer versions of Mercurial (1.7.0 and later), you can use hg merge --tool internal:local to keep the local version (i.e. the one that's in your working directory), or hg merge --tool internal:other to keep the other version. The --tool option was introduced as a shorthand for --config ui.merge=internal:local, which was how you did it in older versions of Mercurial.
See the merge-tools online help or use hg help merge-tools at the command-line for more information.
If you know before you're going to merge you can use this quick trick:
to auto select local (or remote) like this:
hg --config ui.merge=internal:local merge
I followed the documentation in https://developer.mozilla.org/En/Developer_Guide/Source_Code/Mercurial
and downloaded FF source with:
hg clone http://hg.mozilla.org/mozilla-central/ src
How can I switch to the FF3.6 'branch' or 'tag'? The documentation said
hg clone http://hg.mozilla.org/releases/mozilla-1.9.2/ 192src
but I don't want to clone both FF main and FF3.6 twice?
Once you have cloned the repo, you have everything: you can then hg up branchname or hg up tagname to update your working copy.
UP: hg up is a shortcut of hg update, which also has hg checkout alias for people with git habits.