Questions tagged [mercurial-hook]

Mercurial hook is a mechanism to customize and extend functionalities of the Mercurial DVCS.

What it is?

Mercurial hook is a mechanism to customize and extend functionalities of the Mercurial DVCS.

Related tags

  • For more specific questions, this tag can be used in conjunction with and which are independent of the software configuration management system that is used.

See also

185 questions
0
votes
1 answer

Mercurial hook precommit get repository path

I'm coding a script to check syntax of repository files. So, I added to my .hgrc file this line : precommit = python ~/tools/check_syntax.py But I want get the path of repository in which I try to commit from check_syntax.py file. Do you know a way…
Samuel Dauzon
  • 10,744
  • 13
  • 61
  • 94
0
votes
1 answer

How to prevent Mercurial Commits containing string on Windows?

I'm looking to prevent commits to my local Windows Mercurial repo if the following string is present in any uncommitted files: DO NOT COMMIT ME I know that the Pre-commit hook I need is pretxncommit. If I were on Linux I would just do something…
DOOManiac
  • 6,066
  • 8
  • 44
  • 67
0
votes
1 answer

Get list selected for commit files in hg hook

I'm writing a hook, which is supposed to process files before they actually will be commited. So I found out that I can get list of all files have chanded recenlty like this: def hook(ui, repo, node, **kwargs): changedFileList = …
Roman
  • 1,396
  • 4
  • 15
  • 39
0
votes
3 answers

Mercurial - Add tag to committed files on commit

We are looking for a way to add / update a custom tag at the beginning of each file being committed during a commit. Its some kind of local timestamp we need. I was thinking of hooks. Unfortunately I cannot find a useful hook for that: precommit:…
Hemisphera
  • 816
  • 6
  • 23
0
votes
1 answer

How to add a hook for post bookmark activation

I use a bookmark based development approach and have various scripts written to help me do this. I'd like to run one of these scripts after updating to a new bookmark. I've added an update hook, but this seems to run before the bookmark has been…
Martyn
  • 16,432
  • 24
  • 71
  • 104
0
votes
1 answer

Mercurial list files from changegroup

I want a simple command to get the list of files which differ after pushing to a mercurial repository on a server, that is the differences between the previous push and the current push. On the server, I have a hook on the changegroup event which…
0
votes
1 answer

Looking for a tool or best practice for centralized mercurial hook management

we have around 50 mercurial repositories, running in a rhodecode instance and i need to maintain their hooks, e.g. to trigger hudson builds. I'm not very adept with sed/awk etc, so maintaining the hooks is a constant struggle for me. Most hooks…
tobi42
  • 805
  • 10
  • 18
0
votes
1 answer

Mercurial - How to configure multiline hook on Windows

Running Windows 7, configuring a commit hook in my .hgrc file. The hook calls an external powershell script and passes it a few parameters. When I put all the parameters on one long line, the script receives them just fine. However, when I try…
0
votes
0 answers

Mercurial Hook to Execute Pulled SQL Files After Update

I am using SourceTree with a Mercurial BitBucket repository. I would like for any SQL script files (*.sql) pulled from my remote BitBucket repo into my local one to simply be executed immediately after I update my working copy with the pulled files.…
0
votes
1 answer

Mercurial - Auto updating of a local repo after push to remote repo

We use Mercurial and Kiln for source control. Here is what I want to accomplish but have not had any luck unfortunately Let's say we have 3 repos in play. One remote (https://company.kiln.com), one local on my dev machine, and one local on an FTP…
TechDawg270
  • 725
  • 3
  • 9
  • 20
0
votes
1 answer

Force push after hook in Mercurial

Id like to know if it is possible to force a push after a hook in Mercurial. I developed some pretag hooks to work with Redmine versions, and I close the version in the tracker if all the checks are OK. The thing is that the user can close the…
JorgeeFG
  • 5,651
  • 12
  • 59
  • 92
0
votes
0 answers

Mercurial hook for rejecting changesets

I'd like to create a blacklist.txt file of changesets that are, well blacklisted from the repository and enforce that these changesets never get pushed to the "master" repo. Ideally I think I should be installing a server-side hook to handle this,…
WhiskerBiscuit
  • 4,795
  • 8
  • 62
  • 100
0
votes
1 answer

precommit hook failed [code 225] mercurial

I'm trying to commit with tortoiseHq, but I'm getting the error Abort: precommit.whitelist hook failed, and the file is right since I diff'd with the file from another repo which is working fine and they have equal binary. What should I do to fix…
Test
  • 87
  • 4
  • 12
0
votes
0 answers

The Bug genie mercurial integration under windows

I'm struggling to get the mercurial hook script for The Bug Genie working under windows, it can be found here : TheBugGenie:Addons:VCSMercurial The hook seems to fire but the command prompt rapidly disappears with the error message (probably) in…
kriss2
  • 15
  • 4
0
votes
2 answers

Mercurial hook, when others pull

I have a central master repository and several working copies. The working copies pull from the master and I need to do some work with the master at this moment. So, I would like to have a hook, that gets triggered whenever another repository pulls…
Mike M
  • 2,263
  • 3
  • 17
  • 31