1

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.

Community
  • 1
  • 1
Nebelhom
  • 3,783
  • 4
  • 21
  • 22

1 Answers1

2

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

smooth reggae
  • 2,189
  • 13
  • 14
  • Thanks for answering. I did as you said, but the output is the same :( Is it possible that it uses some global hgrc file? I know I am grasping at straws here, but I truly have no idea what's going on. – Nebelhom Mar 24 '13 at 02:26
  • 1
    The "global" configuration would be in `$HOME/.hgrc`; the local configuration would be under `.hg/hgrc`; if you don't see anything in either that might help, try adding `debug = True` under `[ui]` in `.hg/hgrc` (I assume that you added this in `$HOME/.hgrc`). [Here's](http://www.selenic.com/mercurial/hgrc.5.html) more about the configuration files for Mercurial. – smooth reggae Mar 24 '13 at 02:41
  • I adjusted the post to give you more information. Sorry, but it isn't much :( Thanks again, for your help. – Nebelhom Mar 24 '13 at 09:47
  • Ok, I found the culprit now. It was indeed in the global .hgrc file. I simply overlooked it. Sorry about that. This must still be an artifact from a previous project. Thanks for your help. – Nebelhom Mar 24 '13 at 09:52