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
1
vote
1 answer

mercurial-server pretxncommit hook not working

Server $ hg --version Mercurial Distributed SCM (version 2.0.2) /usr/share/mercurial-server$ cat mercurial_server-1.1.egg-info Metadata-Version: 1.1 Name: mercurial-server Version: 1.1 $ cat…
yodhevauhe
  • 765
  • 3
  • 11
  • 33
1
vote
0 answers

how to use mercurial pretxnchangegroup hook to push changegroup to another temporary repo for validation?

I am trying to use mercurial pretxnchangegroup hook to run validation test on the incoming changegroup before the push transaction is complete. (the idea is from this post: Mercurial pre-push hook scanning the working copy ) The simplified flow…
1
vote
1 answer

hg hook -> check merged files

I have a hg hook that checks files that are in commit (pretxncommit type of hook) for coding standards. However if I make a merge all files are excluded from checking. If I make a merge and edit then some of the merged files they are processed by…
1
vote
2 answers

How can I hook Mercurial to ignore differences in parts of a file?

I have a couple of repositories that I use for keeping track of scripts for various purposes in our system. For example, several of the scripts are sql scripts that are useful to pull up, modify, and execute. Very frequently, these scripts will…
Chris Phillips
  • 11,607
  • 3
  • 34
  • 45
1
vote
2 answers

Amending the local commit after rebase in mercurial

In the beginning, my local repo looked like: C1 -> C2 -> My1 and the remote repository looked like: C1 -> C2 -> R1 -> R2 So I did: $ hg pull $ hg rebase Now the repo looks like: C1 -> C2 -> R1 -> R2 -> My1 Now I have made some changes to a file…
Deepak Garg
  • 366
  • 3
  • 12
1
vote
1 answer

Mercurial post update hook

Is there a way to run a hook after an update command (e.g. hg up -r tagName). I don't really have much experience in hooks and it seems most guides are based on post commits, pulls or pushes. In a team we commit and push regularly, but only update…
Paystey
  • 3,287
  • 2
  • 18
  • 32
1
vote
1 answer

Mercurial notification extension globs ignored

I am attempting to use file patterns to limit push notifications to specific directories. The following glob patterns in [usersubs] are not triggering emails, though the basic patterns of asterix and double asterix work. OS: Windows…
Chip McCormick
  • 744
  • 4
  • 17
1
vote
1 answer

hg changegroup hook - suppress specific output from hg?

I have written a changegroup hook that is invoked in my local repository when I pull changes from the remote server copy. In the hook implementation, I invoke hg update to pull in the changes. On running hg pullcommand, the output shows as…
lava
  • 1,945
  • 2
  • 14
  • 15
1
vote
1 answer

Mercurial EncodeDecodeFilter tempfile template not picking up my OUTFILE from sed batch

I am currently being ruthlessly disabused of the simple, and seemingly necessary premise that if you follow the docs, things will work as advertized. While I do understand that this is not always the case, lately I have been plagued by a torrent of…
Mark Robbins
  • 2,427
  • 3
  • 24
  • 33
1
vote
3 answers

Call batch file from webservice to write to a text file

This may seem a bit crazy, but if you can tell me a better way please do. I need a webservice that will display the mercurial revision number for the current version. I have a very simple batch file that writes this number to a text file cd…
Simon Martin
  • 4,203
  • 7
  • 56
  • 93
1
vote
0 answers

How to implement a custom rules for pushing changes on hg or git in a way that is easy to deploy?

Use case: you want to prevent people from pushing to trunk when trunk is in marked as red - in this case you want to ask them to confirm before accepting this. The problem is local .hg/hgrc hooks is that only you are getting them and this is not an…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
1 answer

Mercurial Commit Hook with Python main function

I'm trying to create a complex mercurial commit hook in python. I want to also be allowed to pass parameters using OptionParser. Here is the gist of what I have so far: .hg/hgrc config: [hooks] commit = python:/mydir/pythonFile.py:main # using…
sinemetu1
  • 1,726
  • 1
  • 13
  • 24
0
votes
1 answer

Less frequent/verbose notifications for hg push

My project uses hgext.notify. Currently incoming.notify = separate messages on every changeset. Considering changegroup notify, but even that contains info about every changeset, just all in one big email. Here's the problem: My work style is…
Krazy Glew
  • 7,210
  • 2
  • 49
  • 62
0
votes
2 answers

Hgweb and changegroup hook not working

I'm using hgweb to publish my local repositories. /project_path/project_name/.hg/.hgrc have: [hooks] changegroup.bitbucket = hg push ssh://hg@bitbucket.org/user/repo When i'm use hg serve, all changegroup hooks working fine, but when i'm using…
libbkmz
  • 641
  • 1
  • 7
  • 17
0
votes
2 answers

How can I enforce Mercurial clients to use a specific version of Mercurial?

As new versions of Mercurial are released, we want to somehow enforce that developers, designers, and others are using the approved (or later) version of Mercurial. For example, we are currently on version 1.8.3 I'd like someway of automatically…
Aaron Jensen
  • 25,861
  • 15
  • 82
  • 91