3

I've added "pre-status" hook to hgrc file, and it works pretty well, if I type "hg status" in console. But this hook doesn't work in Tortoise HG. I spent several hours trying to solve this riddle, but looks like Tortoise HG uses something different from "hg status" to show changes in repository.

Is there any way to make my hook works with TortoiseHG?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
LOMS
  • 51
  • 6

1 Answers1

0

Almost certainly not. The pre-* and post-* hooks are invoked before and after a command is run from the command line, because that's linked to a specific user action (typing a command and pressing enter). ToroiseHG is always scanning for changes to display, so even if it did run command triggered hooks it'd probably be firing it many times a minute.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • Are you talking about all *pre-** and *post-** hooks or specifically about *pre-status* and *post-status* ones? I could understand TortoiseHg might not want to run *pre-status* and *post-status* hooks as the *status* command is special in that it might be run without user taking any action. However, I observe the same for *pre-tag* hook which works in console but seems to not be run by TortoiseHg (TortoiseHg 3.1, Mercurial 3.0). I don't see any reason why this hook (or commit related ones) should not be run by TortoiseHg. – Piotr Dobrogost Feb 03 '15 at 13:55