How to enable Mercurial topics (is it a "live" feature yet)? - mercurial

Following the tutorial at https://www.mercurial-scm.org/doc/evolution/tutorials/topic-tutorial.html I added the following to my mercurial.ini file:
[extensions]
...
evolve =
[experimental]
evolution = all
Yet when I go to the command line and try it out:
# hg topic
hg: unknown command 'topic'
(did you mean pick?)
# hg topics
hg: unknown command 'topics'
(use 'hg help' for a list of commands)
That's all I get.
(hg evolve does work, however.)
I've searched but can't find any other documentation on either how to enable it, or if maybe it just isn't in the regular releases yet. But from other posts here & elsewhere, it does seem that people are using it. Although it is not listed in https://www.mercurial-scm.org/wiki/UsingExtensions.
What do I need to do to enable it?
My version of hg is the latest:
# hg --version
Mercurial Distributed SCM (version 5.6.1)

The tutorial is incorrect (out of date?)
You have to add the following to the Mercurial configuration file:
[extensions]
evolve =
topic =
I eventually spotted this at https://heptapod.net/pages/quick-start-guide.html.

I needed to provide paths to make it work on my system:
[extensions]
evolve = C:\Program Files\Python39\Lib\site-packages\hgext3rd\evolve
topic = C:\Program Files\Python39\Lib\site-packages\hgext3rd\topic

Related

hgrc extentions in /home folder not recognized

I added the convert extension (with no path) to my /home/user/.hgrc file, but it is not working:
$ hg convert source_r56 source_r56_fixed --filemap exclude.filemap
hg: unknown command 'convert'
'convert' is provided by the following extension:
convert import revisions from foreign VCS repositories into Mercurial
use "hg help extensions" for information on enabling extensions
I ran "hg help extensions" and realized that none of the enabled extensions in the file are showing as enabled.
I tried setting it in the source_r56/.hg/hgrc as well to no avail.
Update:
$ cat ~/.hgrc
[ui]
username = jetimms <jetimms#jetimms>
verbose = True
[extentions]
convert =
progress =
rebase =
[alias]
ssh = ssh -C
$ cat ./.hg/hgrc
[paths]
default = /home/jetimms/source
[extentions]
convert =
$
(BTW: source_r56 was cloned from a repository called "source".)
Perhaps to better answer the question about whether I am having the same problems with other extensions, I have included part of the results from "hg help extensions" regarding disabled extensions. Here I only note the ones listed above in the the ~/.hgrc. As noted in the comments, I have not used any other extensions.
$ hg help extensions
Using additional features
...
disabled extensions:
...
convert import revisions from foreign VCS repositories into Mercurial
...
progress show progress bars for some actions
...
rebase command to move sets of revisions to a different ancestor
$
You mispelled the word extensions in your .hgrc. Change [extentions] to [extensions] and you're set.

Mercurial HG 'pretxncommit.whitespace hook exited with status 1' but no hook specified

the title of this request says it all pretty much. I have no hooks defined in my .hgrc file, but I am getting this rollback message on running hg commit:
transaction abort!
rollback completed
abort: pretxncommit.whitespace hook exited with status 1
my hgrc file looks like this:
[paths]
default = 'the_address'
[ui]
username = 'my name and email address'
verbose = True
[extensions]
mq =
[diff]
git = 1
unified = 8
Just in case it is important. I am using Mercurial on Ubuntu 12.04 and I am trying to combine it with using a XAMPP installation (Apache friends) in the /opt/ directory, so I always have to run sudo before doing a commit.
Looking through SO and searching on the web, I found that this error is due to a hook with regard to trailing whitespace in the code (Compare this part of Mercurial: The definitive guide and also this SO entry on hooks). Strangely enough, I haven't defined this hook anywhere, so I also don't know how to remove it.
Any help in sorting this out would be appreciated. Thanks guys.
============================================================================
EDIT: Incorporating what smooth reggae suggested, I put a hgrc file in the home folder and the root folder and I adjusted the hgrc file in etc/mercurial just to find out what the deal with this problem is.
I am not sure, how much more information debug = True should give, but I didn't get particularly much. At the beginning of the commit message, I see the following now:
could not import hgext.hgext.mq (No module named hgext.mq): trying hgext.mq
could not import hgext.hgext.transplant (No module named hgext.transplant): trying hgext.transplant
So, this means, it can't find these two files, but why?
Thanks again for all your help.
EDIT2: Please note that the first EDIT is an unrelated issue and can be ignored for this particular question.
can you add debug = True under [ui] in your .hgrc file? That will give you some more output, which might offer some insight into the location of this hook

Setting username in Mercurial .hgrc file

I have been browsing SO and Google for a solution to my basic problem, and so far I have had no luck.
I am brand new to Mercurial and have just installed it on my Mac. I am using it for personal version control and will not be communicating with a central server (yet).
When I try to commit files, I get abort: no username supplied (see "hg help config"). The common solution to this problem is putting the following in ~/.hgrc
[ui]
username = Firstname Lastname <firstname.lastname#example.net>
which I have done, but the error remains. It just won't read the file. Any suggestions?
For future reference: use
$ hg showconfig ui --debug
to see the settings from the [ui] section and to see the files Mercural reads for configuration settings. That should help you along if you ever have to debug such a case again.

Problem with loading hggit extension in TortoiseHG

I'm trying to get the hggit extension to work under Windows 7 (64bit) using TortoiseHG (2.1.2). I followed the official setup instructions, i.e. cloning the hg-git repository and adding the "hggit = ..." line to the extensions section in my mercurial.ini file.
However the extension doesn't seem to be loaded. When trying to clone a repository I get the following error :
abort: repository git://... not found!
running
hg help hggit
results in
hg: unknown command 'hggit'
I also don't get any errors at all, no matter what I put in the extensions section of the mercurial.ini file.
Any ideas on what the problem might be ? Are there any log files at all that show me whether there are problems loading the extensions ?
Had the same problem, and in my case I forgot to specify the [extensions] line in the INI file.
Not working:
[ui]
username = My name <my#emailaddress.com>
hgsubversion=D:\Repotools\hg-svn\hgsubversion
hggit=D:\Repotools\hg-git\hggit
Working:
[ui]
username = My name <my#emailaddress.com>
[extensions]
hgsubversion=D:\Repotools\hg-svn\hgsubversion
hggit=D:\Repotools\hg-git\hggit
When you run the command hg help hggit it will report if the directory path is incorrect.
You should include what you have after hggit =
It should be pointing to the hggit subdirectory in the directory you cloned the repository into.
e.g. hggit=C:\hg-extensions\hg-git\hggit

Mercurial: make `hg log` not show files?

I'm (ab)using Mercurial to manage thousands of files that change often, but I'd like to be able to view the log (hg log) without having my term filled with all of the filenames that changed on each commit. hg log -q is a little too quiet, since I need to see the descriptions. Is there a flag I'm missing for hg log?
It sounds as if you might have the verbose flag turned on. You can check by running hg showconfig and looking for a line like ui.verbose=true.
There are a few ways you can fix it:
remove that line from the offending configuration file (Mercurial can use several, and they vary by OS: use hg help config to list the possibilities).
override the flag in your repository's .hg\hgrc or your private Mercurial configuration (Mercurial.ini or ~/.hgrc): add the following lines to it:
[ui]
verbose=false
clear the verbose flag on the commandline: hg log --config ui.verbose=false.