MacOS Mountain Lion Mercurial postreview: - mercurial

I am issuing the following command:
hg postreview -o -e 4714 tip --debug
with this result:
using http://....
sending capabilities command
abort: repository 'http://...' is not local
(I shortened the URLs, the url is the right one)
This error does not seem to originate in the postreview extension, but I can not figure out what the problem is. Does someone know?
Thanks. Chris
=============
System:
I have OS X 10.8 (12A269) installed
Python: Python 2.7.2 [GCC 4.2.1 Compatible ..
Installed mercurial through mercurial-2.3+20120807-py2.7-macosx10.8.mpkg which was downloaded from http://mercurial.berkwood.com/
I use the extension postreview: https://code.google.com/p/mercurial-reviewboard/

This is a problem since mercurial 2.3
I have updated my clone of mercurial reviewboard plugin to fix it here:
https://bitbucket.org/windix/mercurial-reviewboard/
Note that, this is not the official mercurial reviewboard plugin (which is at http://code.google.com/p/mercurial-reviewboard/). The one I am using is with outogoing support (so you can send all the outgoing changesets for review at once).
There has been an issue submitted to the official one here:
http://code.google.com/p/mercurial-reviewboard/issues/detail?id=48
so hopefully someone will fix it there

Related

Mercurial (TortoiseHG) command-line on Windows does not respond to pager environment variables (and fails to use a pager at all)

When I run commands such as hg log, I expect to see the output in a pager. I have configured my repository .hg\hgrc to use less:
...
[pager]
pager = C:\path\to\bin\less.exe
...
I have confirmed that less is correctly installed, as I am able to run it.
I have also confirmed with hg config --debug that this environment setting is correctly registered:
...
C:\path\to\repo/.hg/hgrc:23: pager.pager=C:\path\to\bin\less.exe
...
However, the output is instead dumped into terminal. This is a major nuisance, especially with hg log since the project I am working on has history dating back to 2001. Removing the configuration settings does not cause output to go through more, which according to Mercurial documentation should be the default Windows pager. (and yes, I have checked that more is installed)
If no pager is set in the user or repository configuration, Mercurial uses the environment variable $PAGER. If $PAGER is not set, pager.pager from the default or system configuration is used. If none of these are set, a default pager will be used, typically 'less' on Unix and 'more' on Windows.
Is it a known issue that Mercurial pager support on Windows is currently broken? If not, what steps can I take to make Mercurial recognize and use a pager? At this point I don't even care if it uses less as long as the output is sent to any pager.
Environment: Mercurial version 6.3.2 (installed with TortoiseHG) on Windows 11.
I have attempted to run hg commands through Command Prompt, Powershell, and Git Bash; none of them correctly use the pager configuration (or any other pager, e.g. more).
EDIT: in response to a comment below, here is the full output of hg --version --verbose:
Mercurial Distributed SCM (version 6.3.2)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2023 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Enabled extensions:
This question does not resolve my issue as it uses the PagerExtension, which is outdated and unnecessary as of current Mercurial version. I have also tried the steps here to use the PagerExtension, to no avail.
TortoiseHG is slightly different than pure Mercurial in Windows, not due to code-changes, but (as it was discovered during last researches) due to py2exe limitations.
Pager support is one of such things: if you'll run hg version --debug you'll see warning about it
> hg version --debug
pager is unavailable with py2exe packaging
Mercurial Distributed SCM (version 6.3.2)
(see https://mercurial-scm.org for more information)
...
Workarounds
Use pure Mercurial in parallel with THG - install and put HG path in PATH after THG's
Because I'm lazy (as declared) I use hg log | bat -p -l log --pager "moar --no-linenumbers" with best viewer and pager at a time and even still don't overload hg login shell alias (use PowerShell history and expansion)

TortoiseHg 3.6.3 broke mercurial keyring?

I upgraded to Tortoise 3.6.3 yesterday and now I am prompted every time I pull or push a repo. The keyring is set properly, and my user name is in the url.
Any ideas on what may be wrong? Did 3.6.3 break keyring?
Issue 4401 "mercurial_keyring always asks for user/password" from time of 3.6.2 closed as pure extension-specific and contains solution: don't use username in URL anymore
Here is what to put into .hg/hgrc:
[auth]
default.username=myname
default.prefix=http://myrepo
A good way to debug issues like this is to run merciural from the command line with the debug flag, as in:
hg pull --debug
This will clearly indicate if there are problems getting the repo, user name, and password.
UPDATE: A new version of TortoiseHG has been released (3.8.3 at the time of writing) and fixes this issue: upgrading to latest version should be enough.
I had this exact same problem and found the following investigation article to be quite helpful to better understand what't going on (I'm not the author, BTW).
To cut it short, it seems a bug of the mercurial_keyring extension v1.0.1, introduced in TortoiseHG 3.6.2, which also appears to be fixed in v1.1.1.
If you're into Python compiling, it should be possible to upgrade it manually into TortoiseHG by getting it from its official bitbucket repo, compile it and manually place it into TortoiseHG's /lib/library.zip file (backup it beforehand might be wise): if you're not, you have 2 options:
1) clone the bitbucket repo to your HDD and then configure your Mercurial installation to use the new version of that extension module by writing the following in your C:\Users\USERNAME\mercurial.ini file (which was what I did):
[extensions]
mercurial_keyring = /path/to/mercurial_keyring/mercurial_keyring.py
(Notice: you might also have to put the path in your PATH or PYTHONPATH env variable, depending if you already have Python and/or Mercurial installed on your machine).
2) wait for the next TortoiseHG release that will contain the updated version.

Installing and Configuring Mercurial on Jenkins application -OpenShift

Any hints on how doing this? I tried with the auto-install from a downloaded zip from this here, extracted here: OPENSHIFT_DATA_DIR/hg and executable location here: OPENSHIFT_DATA_DIR/jenkins/data/tools/Mercurial/mercurial-2.2.1/bin/hg
I'm doing something wrong for sure, I'm not Linux saavy. Jenkins says is unable to find mercurial executable.
Any help is more than welcomed.
Here's the answer from here:
Thanks for the email discussion.
Mercurial includes a README which explains a couple of modes of execution:
Basic install:
$ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help
Running without installing:
$ make local # build for inplace usage
$ ./hg --version # should show the latest version
"make install" will not work as it attempts to do a system-wide install. The user on the gears will not have access to write to system files.
"make install-home" will not work either.
"make local" works and will install it in cwd such that running the following will should work just fine:
./hg --version
Mercurial Distributed SCM (version 2.2.1)
(see http://mercurial.selenic.com for more information)

How to update Mercurial client in CentOS6?

I have Mercurial 1.4 in my CentOS6, but I need to use the Eclipse Plug-in that uses at least Mercurial 1.5. How can I update my Mercurial version in CentOS6?
Setting up Install Process
Package mercurial-1.4-3.el6.x86_64 already installed and latest version
Nothing to do
When I try do download a new RPM(mercurial-1.9-1.el6.rfx.x86_64.rpm) and install it, I got this error:
emacs-mercurial-1.4-3.el6.x86_64 requires hg = 1.4-3.el6
What should I do?
Any clues?
Best Regards,
For the same purpose I successfully upgraded my hg in CentOS to 2.1.2 by downloading the correct rpm from here:
http://pkgs.repoforge.org/mercurial/
and installing it with yum...
regards
You can install from source, just follow the instructions here.
Just run into this while trying to get hg-git working on my CentOS 6 environment.
In 2015 there are RPMs and/or yum repos from the official download page.
FWIW - for hg-git I had to pip-install still (package in epel is pretty old and didn't work).

Uninstall Mercurial on a Mac

I installed Mercurial, only to realize that it's not supported yet with MonoDevelop, and then realized that I have no clue how to properly uninstall it.
I've googled around and can't find anything to support uninstalling it.
MonoDevelop's support for version control is lagging, and only basic support for Git will be added in version 2.6. I would suggest keeping Hg installed and use the command line. You shouldn't dismiss using a great DVCS just because your IDE doesn't integrate with it.
Since Hg is Python based, you may be able to use easy_install to uninstall it for you.
easy_install -m mercurial
See easy_install documentation for more information
You can uninstall mercurial by deleting the executable, but this seems to be the only way to fix the problem. The executable is in /usr/local/bin or in usr/local/bin/hg (I'm not quite sure), but deleting the executable (and all related files) is a dirty, but working, way to uninstall mercurial.
I did:
sudo rm /usr/local/bin/hg # To remove my local version (yours may be elsewhere)
sudo pip uninstall mercurial # To remove mercurial from my Python
Pip is not install by default so I guess you can use:
easy_install -m mercurial # Like Steve suggests
This recipe works well for me.
I had luck following the suggestion of this post on the mercurial listserv:
Launch again the mpkg you used for the installation, go to the second
window (Read me or something similar) and check the "After the
install" section.
On Mac OS X 10.6, the text is: This package installs the hg executable
in /usr/local/bin and the Mercurial files in
/Library/Python/2.6/site-packages/mercurial.
I can imagine you have to replace 2.6 by 2.7 on Mac OS X 10.7.
Though totally forgotten how I installed it, the following did the work for me.
sudo rm -fr /usr/local/lib/python2.7/site-packages/mercurial*
Open Terminal and type this command.
defaults write com.apple.finder AppleShowAllFiles -boolean false;killall Finder
Why not simply use the prompt or a 3rd party gui for mercurial? This is usually preferred over IDE Integration for speed/reliability anyways.