Pulling the code from Mercurial - mercurial

I am just getting into using Mercurial and I saw that someone was using the command
hg pull - - update -vvv
what does -vvv mean?
Thanks

Not 100% certain (-vvv isn't a standard switch in Mercurial), but -v on its own makes the output verbose. When performing a verbose pull-with-update (hg pull --update -v), this outputs a tad more information, primarily which files are being updated, etc.
Running your command (using -vvv) has the same effect as -v, so Mercurial is treating it as a verbose switch. The output certainly doesn't come out more verbose.
My guess is that the person in question has a stuck key :)

Related

Why does hg gexport not work with the --cwd parameter?

Question title is pretty much the question. Here's a look at what I get:
I am trying to export a mercurial repository to git, but to a different directory. hg gexport works just fine without the --cwd parameter, but I don't want that -- I want to change the working directory to another one, but strangely, it says unknown command when I use that command line switch.
Any ideas?
Real hgexport is not native hg command, it's part of hggit extension
According to wiki, this part ("Using hg-git to interact with a hg repository with git") is outdated and may not reflect current state of extension
>hg gexport --cwd $PATH work in my own tests without errors (so-so, see below) with command-line expanded accordingly to requirements
hg gexport --cwd i:\Work\Personal!whyhq\ -R i:\Work\Personal!whyhq\site
without -R gexport will not find source hg-repo after cdto target location
And last, but not least: even properly used, hgexport in current hggit
hg id
15457fc67631 0.8.13
do nothing (nothing changed on target). I suppose, for getting git-repo from hg you have to use trivial hg push <git-URL> today (yes, it work, with minimal tricks on your side: branch_bookmark_suffix = $STRING in .hgrc)
Side note
If you have hggit extension enabled (globally or per-repository) hg-repo is mirrored automagically into bare git-repo (at least it seems so) in .hg/git directory, you can just copy&rename it

How do I diff incoming changesets with Beyond Compare 4 and hg?

I have been using the mercurial and Beyond Compare 4 tools together for about 2 weeks now and feel fairly confident in my usage, however I still seem to have a problem when comparing incoming changesets against my current local codebase. The problem is emphasized when I attempting a complicated merge.
Just to clarify, I am avoiding the use of tools such as TortoiseHg,
although I do have it installed. I am searching for feedback via cmd line operations only.
My current templated method to pull down the incoming changesets via the following ( as an [alias] )
hg in --verbose -T "\nchangeset: \t{rev}\nbranch: \t{branch}\nuser: \t\t{author}\ndate: \t\t{date(date,'%m-%d-%Y %I:%M%p')}\ndescription: \n\t{desc|fill76|tabindent}\n\n{files % ' \t{file}\n'}\n----------\n"
As an example, here is a simplified (and cleverly abstracted) block returned ::
changeset: 4685
branch: Feature-WI209825
user: Jack Handy <jhandy#anon.com>
date: 01-19-2015 10:19AM
description:
Display monkey swinging from vines while whistling dixie
Zoo/MonkeyCage/Resources/Localization.Designer.cs
Zoo/MonkeyCage/Resources/Localization.resx
Zoo/MonkeyCage/Utility/Extensions.cs
If I were to be comparing changes locally, I would simply use the following command ::
hg bcomp -r 4685 -r default <optional file name>
and then I would get an instance of Beyond Compare with a folder structure and files and I could just navigate accordingly to view the changes...however, when I attempt to do this with a changeset that has yet to be pulled into my local repository, I can't.
How do I diff incoming changesets with my local repository?
---- UPDATE --------------------------------
I pursued the idea of bundling the incoming changes and then trying to use BC4 to diff the bundle to any given branch/revision on my local repo.
hg in --bundle "C:\Sandboxes\Temp\temp.hg"
This creates a compressed file archive containing all the new changes.
Now I simply need to diff this bundle with my local, however am having difficulty optimizing this. Currently, I am using variations on the following command:
hg -R "C:\Sandboxes\Temp\temp.hg" bcomp -r default
Alas, I am still having difficulty perfecting this...any insight is appreciated.
I don't see how you can, since your local repository doesn't yet have that changeset, so mercurial can't create a local copy of the revision, as it doesn't have visibility of what the change actually is.
The -p flag to hg incoming will show you the patch for each revision, but that isn't what you want.
Why not just pull the remote changes anyway? It wont hurt unless you actually update. You can then do your diff in the normal way.
hg diff is a local operation.
But you can simply call hg incoming -p in order to obtain a diff view of what you're going to pull. See hg help incoming for more options and refinement (e.g. if you need to diff against a specific rev etc)

How do you redo the manual merge of just one file in mercurial?

When I perform a merge in mercurial with a number of manual conflict resolutions, sometimes I realize before committing that I've made a mistake in one or two of the files. Short of starting over and redoing the whole merge, how can I tell mercurial to pop up the merge tool for a single file to let me redo the manual conflict resolution?
I found it hard to figure this out from the mercurial help and google. I eventually got it by trial and error, though, and thought I'd post what I learned here.
To re-resolve a single file requires a two-step process:
hg resolve -u <file>
hg resolve <file>

Mercurial Push/Pull verbose output

Is it possible for a verbose output of what exactly is happening when I push/pull the repositories? Currently, I have a large repository that I am pushing to the server, and after about 15 min. or so, it gives me an error, but does not tell me what it was doing during those 15 min.
Did you try the -v verbose parameter? As in;
hg pull -v
hg push -v
I have unselected the previous answer due to additional info. For anybody who comes across this problem, you may be using TortoiseHg 1.1.7 from HERE. Try the newer version from HERE. As far as I can tell, this version is much better, cleaner GUI, more feature-filled interface and has verbose output that I wanted, and overall is definitely worth the switch. The version is 1.9. I am not sure if it is a continuation of the original TortoiseHg or a completely new project altogether.

In mercurial, how do I get a preview of the number of files with true conflicts?

I'd like a quick way to know how many conflicts I will need to merge manually. Is this built-in? Or is there an existing tool to use as the merger to just count this?
There's no built in predictor command, as it would take as much effort computationally as doing the merge. However, if you do a hg --config ui.merge=internal:fail merge it will exit immediately and you can do a hg resolve --list.
That will show you what you're in for, and you can either continue with hg resolve --all or give up with hg update -C .