187 questions
3 votes
0 answers
49 views
How to prevent a mercurial commit with no files specified (prevent commiting all modified files) using a hook
I am working on a mercurial hook in python to prevent a general commit when one forget to specifies files to be commited. I commited by accident several debug modification and don't want this to ...
1 vote
1 answer
69 views
Reliably run Mercurial's "hg status" from a C# program
I've written a C# program to act as a precommit hook for Mercurial, but the only way I could get it working reliably was kind of convoluted, so I must have missed something. I'm running TortoiseHg 6.4....
1 vote
0 answers
21 views
Syncing configuration files from production server to mercurial repository
We have an admin page that allows us to upload and update a configuration file on our production server. We want to maintain a record of all changes made to the configuration file, so we need to push ...
2 votes
1 answer
69 views
How do I write a hook around mercurial's "push creates new remote head"?
I want to make a hook that when someone is pushing to the remote, if they get the abort: push creates new remote head error message, the hook will try to merge the remote and local head (if easy merge ...
1 vote
1 answer
188 views
Why does MERCURIAL_REVISION return the value NULL when I try accessing it on Jenkins
On Mercurial I've implemented a hook in my hgrc file that activates when some sort of change occurs in Jenkins(i.e tagging or committing). Here is my hook code: curl -X POST http://tokenusername:...
0 votes
1 answer
154 views
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 ...
0 votes
1 answer
88 views
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 ...
2 votes
0 answers
49 views
Mercurial - repos with multiple ACL rules
I'm trying to use 2 set of rules for the ACL of my repos. I was thinking that maybe the action name could be useful from the hooks section but that not the case. The rules are : 1) Only be able to ...
0 votes
1 answer
354 views
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 ...
1 vote
0 answers
55 views
How to share mercurial hooks with your team for jenkins
I am aware that I need to add hooks in my .hg/hgrc file. I could add something like: commit.jenkins = wget -q -O /dev/null <jenkins root>/mercurial/notifyCommit?url=<repository remote url>...
1 vote
0 answers
54 views
Prevent pull of a branch using a hook
There is a repository which must be protected from accepting a specific set of named branches coming from other repositories. How can this be accomplished using hooks? It seems possible by using ...
7 votes
2 answers
941 views
Pylint failing to load plugin on a mercurial precommit hook
I am trying to create a mercurial pre-commit hook that runs pylint on the pre-commit. My project uses a virtual environment. I have the hook set up to call pylint on the changed files but I get the ...
1 vote
1 answer
49 views
How do I find out where the Mercurial hook file is being called from?
On the project I am working on there is a standard pre-commit hook for mercurial that looks something like this: python:hookhgext.messagevalidation.checkCommitMessage I would like to find out where ...
1 vote
1 answer
223 views
Is it possible to add new files to mercurial commit via pretxncommit hook or any other method?
I want to check what files have been modified in current commit and base on that I want to modify or not specified file and add it to that commit. I was thinking about using script on pretxncommit ...
0 votes
1 answer
375 views
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://[email protected]/...