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: isn't recompiled after change?

Ok, this is really weird. I have an old Mercurial 2.02. with python 2.6 on an old Ubuntu-something (I think 10.4). We are a windows shop, und push regularly, so I wanted kind of a review service. It absolutely worked on windows.. pretxnchangegroup…
hko
  • 923
  • 9
  • 17
0
votes
1 answer

Mercurial hook: check changesets as patch file(s) on "server" before final push

Simple scenario: I want to access changesets once before pushed, and send file diff info (in the usual git diff format.. or any other base64-serialisable format) to my own RESTful webservice for checking. I already have a pretxnchangegroup hook…
hko
  • 923
  • 9
  • 17
0
votes
1 answer

Mercurial preoutgoing hook succeeds when a build fails

I have a very basic bat file with code (below) @echo off %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild CaptainHook.sln /m /nr:false /p:Platform="Any CPU" /v:M /fl…
Perpetualcoder
  • 13,501
  • 9
  • 64
  • 99
0
votes
1 answer

mercurial changegroup hook - specify most recent node

I want to use mercurial hooks to trigger regression builds (in Jenkins) when developers push from their local repos to a central, remote repo. In path/to/repo/.hg/hgrc [hooks] changegroup = python:jenkins.py:trigger_build And jenkins.py: def…
laffoyb
  • 1,540
  • 3
  • 22
  • 35
0
votes
1 answer

Automatically merge new heads on push

Is it possible to react to a push to a repository with a hook and merge all new heads that are created by this push? My use case for this is the following: I'm trying to design a repository that would only allow very specific changes with a commit…
Flogo
  • 1,673
  • 4
  • 20
  • 33
0
votes
0 answers

Change a commit message when amending a commit

Is there anyway i can change a commit message trough a hook when someone amends the commit message ? I tried to use precommit hook but this hook isn't called when amending. I also tried to call hg commit --amend from the changegroup hook, but this…
Willem D'Haeseleer
  • 19,661
  • 9
  • 66
  • 99
0
votes
1 answer

Mercurial pre commit hook to modify settings

I'm trying to setup my web-app (browser extension) so that I can seamlessly move between development, test and production. For the most part I've avoided hardcoding any URLs into the app, but there are few places where this isn't possible: As a…
0
votes
1 answer

Mercurial pretag hook called even with --remove option

I am a newbie to Mercurial and I am writing a pretag hook to check policy on tag names. I have the below code. version_re = r'(ver-\d+\.\d+\.\d+|tip)$' def invalidtag(ui, repo, hooktype, node, tag, **kwargs): assert(hooktype == 'pretag') .... if…
Sujay SA
  • 11
  • 3
0
votes
1 answer

Mercurial: create local copy of a remote repository at the remote respository

I use Mercurial on desktops, and then push local repositories to a centralized server. I noticed that this remote server does not hold local copies of files in its repositories (the directory is empty, except obviously for the .hg one). What is the…
WoJ
  • 27,165
  • 48
  • 180
  • 345
0
votes
1 answer

Mercurial hook hgrc

I know how to include Mercurial hooks in my local repository. This is done by adding the hook to the hgrc file along with the location of the Python code and the Python…
VRA
  • 11
  • 3
0
votes
1 answer

Prevent retroactive modification of database migrations between mercurial branches

Is it possible to prevent someone from pushing commit which touches already applied (committed to separate branch) database migrations? For example, in default branch there are existing migrations 01 and 02 (already applied). In development branch…
Max Arnold
  • 427
  • 1
  • 5
  • 11
0
votes
2 answers

Make TortoiseHG use my Python installation

I created some python hooks for Mercurial that use some external libraries (namely jira-python). In Linux, I install the packages using pip. In Windows, however, Mercurial comes with a bundled version of Python. My hooks fail when I run them because…
Amir Rachum
  • 76,817
  • 74
  • 166
  • 248
0
votes
1 answer

Mercurial eclipse plugin push different server

I have installed mercurial and configured in .hgrc file like this: default (server-1) default push (server-2) This works fine in command line as it is using .hgrc file. I tried using the eclipse plugin for mercurial which is not reading from…
duslabo
  • 1,487
  • 4
  • 20
  • 33
0
votes
1 answer

applying database patches via mercurial hooks

I'm currently trying to determine how to apply mysql database patches via mercurial commit hooks. Basically, I have an incoming commit hook pointing to some script in my search path. This all works. My real question is how do keep a series of…
Greg
  • 6,453
  • 9
  • 45
  • 61
0
votes
2 answers

Mercurial: Force delete after remote hg update hook

We have a hook setup on our remote repositories to automatically update the repo after it receives a push. It works great except when we locally delete a file and then push. We receive messages like this: remote: local changed…
mrceolla
  • 51
  • 1
  • 5
1 2 3
12
13