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

How do I reference the repository's hgrc sections from within my custom hook?

I've written a generic changegroup hook function that I would like to customize for each repository by setting some hgrc section variables, like so: [my_hook_params] name = whatever version = 1.0 How should I go about doing this?
moswald
  • 11,491
  • 7
  • 52
  • 78
0
votes
1 answer

Why doesn't my mercurial pre-commit hook work in MinGW

I have a pre-commit hook in my .hgrc file which checks if more than 5MB of files will be added to the repository. The hook is: pre-commit.added-files-too-large = test 5000 -gt `hg status --added --no-status --print0 | xargs --null ls -lk | awk…
Carcophan
  • 1,508
  • 2
  • 18
  • 38
0
votes
1 answer

Software version number insertion

I have been thinking about a method how to insert software version number in form Major.minor.build into the source code without manual modification of the source code. I have got an idea that all the parts of the version number will be derived…
Steve
  • 805
  • 7
  • 27
0
votes
1 answer

Mercurial pre commit operation

I have been struggling with following problem regarding source codes versioning with Mercurial usage. On one hand I have got source codes in local working directory and those source codes are under Mercurial control. On the other hand I have a copy…
Steve
  • 805
  • 7
  • 27
0
votes
3 answers

hook to limit push to only one branch at a time

I’m trying to create a hook that blocks pushes to a remote repository if you are trying to push more than once branch. Here’s the hook: #!/bin/bash HG_EXE="/opt/csw/bin/hg" CHANGESETS=`${HG_EXE} log -r $1:tip --template '{node} '` i=0 for…
0
votes
1 answer

How to do an automatic build for every commit/tag/push etc on a repository with Mercurial on Jenkins?

My goal from all this is to have Jenkins build every time someone does some sort of change to the repo(i.e tagging or commit). In my .hg/hgrc file on TortoiseHg I included several different hooks in my repository settings. Those hooks have the…
Brogrammer
  • 191
  • 1
  • 1
  • 10
0
votes
1 answer

Setup Mercurial Repository with Jenkins and Jenkins Job?

I need to setup Jenkins to use a Mercurial Repository hosted on BitBucket but running into issues when the job tries to poll the repository. Example URL: hg clone https://joeblogs@bitbucket.org/joeblogs/test2 I'm also attempting to align inside…
Gbru
  • 1,065
  • 3
  • 24
  • 56
0
votes
1 answer

( Bash - Mercurial ) Problem with Execution of a bash script enabling it with Mercurial Hook?

DESCRIPTION I want to send change-log messages to all colleagues when an push is made in a particular branch (test-branch) in a mercurial repository. Mercurial Setup Local cloned repository ( Local Machine of User ) Server Repository ( On a…
Subha
  • 1
  • 3
0
votes
0 answers

Have Mercurial repo reject any push that would result in a multiheaded branch

How can I configure a Mercurial repo to reject any push that would result in a multiheaded branch? As a follow up, how can I configure a clone to always pull before a commit, so hg can warn if the commit will result in a multiheaded branch, so the…
XDR
  • 4,070
  • 3
  • 30
  • 54
0
votes
1 answer

Jenkins Mercurial plugin does not detect changes

When my pipeline polls the Mercurial repo for changes it does not detect any change, and new builds are not triggered. Following the plugin docs, I set up a push hook to trigger the polling, which works fine, but is not able to detect changes. All I…
RogerFC
  • 329
  • 3
  • 15
0
votes
0 answers

abort: No such file or directory: '/mnt/factotum/rpc' [Mercurial]

I am having a problem in taking a clone, push or pull. When I do these, I get an error: abort: No such file or directory: '/mnt/factotum/rpc' How can I resolve the issue? OS: Ubuntu 16 Tool: Mercurial, BitBucket
0
votes
1 answer

hg client and server side hooks

What is hg equivalent for git client and server side hooks? I was trying to find the two different types of hooks for hg like in git, but only found lot of hooks not specific of client or server side. I think hooks cannot be setup on the client…
Mohana priya
  • 27
  • 1
  • 7
0
votes
1 answer

Current bookmark on Mercurial Hook

I would like to make sure when local repo changes are pushed to our main remote repo, people are pushing changes with a bookmark. So either its the first time they push with a bookmark they have added locally (in their cloned repo), or they are…
user1760543
0
votes
1 answer

AWS Linux and Mercurial auto add to environment

I have a development server on an EC2 instance. Mercurial is also installed. The environment is using an Apache server working from /var/www/html. As this is a development environment, I want each commit to the repository will also be copied to the…
Yanipan
  • 664
  • 1
  • 10
  • 28
0
votes
1 answer

Kallithea does not use hooks defined in .hg/hgrc

I want to allow pushing to the default branch only for certain users. Since Kallithea does not have this functionality built in my attempt was creating a hook that should provide that behavior. I know that Kallithea has a GUI for this but I wanted…
Mario
  • 128
  • 7