Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:19:44+00:00 2026-05-27T18:19:44+00:00

Here is my problem: I got a remote mercurial repository where the hook is

  • 0

Here is my problem:

I got a remote mercurial repository where the hook is gonna be setup either incoming or changegroup, and I got a ReviewBoard setup on a different server.
The idea is to automate review request tickets generation upon push from devs into the remote repository.
Of course, I would need a hook that invoke post-review that also uses submit-as user which extracted using the mercurial api (ctx.user()), or else all the review requests tickets would be in the name of the user that connects the remote repository to the reviewboard server.

My main dilemma is actually getting the start revision and the stop revision , if I use incoming I’ll be getting all changesets nodes but of course the hook is getting invoked everytime so there is no status kept between each invocation. On the other hand if I use changegroup I only get the first changeset and I cannot compare.As well for comparaison I need a way to keep the previous tip to send it to post-review basically :

post-review --revision-range=previoustip:newtip --submit-as=ctx.user() 

If you got any ideas on how to solve the problem, I would be happy. I am writing the hook in python obviously.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:19:45+00:00Added an answer on May 27, 2026 at 6:19 pm

    Not sure if this is quite what you need, but this is something I use for executing a commit message check in pretty much the same circumstances, it has to check each change and verify information based on the user. In the same way I need to check the user the changelist is for, not the ‘pushing’ user.
    It should be fairly easy to do something like build up the sets of changes for a particular user and the start and end revisions in ‘chunks’ whilst looping through the changes in the changegroup.

    The return is because it is used as a pretxnchangegroup hook

    def checkAllCommitMessage(ui, repo, node, **kwargs):
        """    
        Checks all inbound changeset messages from a push for adherence to the commit message rules.
        """
    
        # for each change being submitted
        # get all the details, and call the trigger
        fail = False
    
        for rev in xrange(repo[node].rev(), len(repo)):
            # get context (change)
            ctx = repo[rev]
    
            # user who commited the change (NOT necessarily the one who is doing push)
            user = ctx.user()
    
            # do the hook stuff here...
            # set fail to True if something goes wrong
    
        return fail
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a problem similar to,but subtly different from, that described here (Loading assemblies
I've got a similar problem to this post here: gitolite push error -> remote:
I've got a problem here with an MSI deployment that I'm working on (using
here is my problem: I've got a repeater on my asp.net (VB): <asp:Repeater ID=Repeater1
I've got a quite strange problem here. I'm calling some simple code via Ajax.Updater:
I've got an interesting box-model problem here. I have a header full of links,
I've got a Schroedinger's Cat type of problem here -- my program (actually the
Here's the problem I'm having, I've got a set of logs that can grow
I got the problem similar to this post here: https://rails.lighthouseapp.com/projects/8994/tickets/106-authenticity_token-appears-in-urls-after-ajax-get-request routes.rb map.namespace(:admin, :active_scaffold =>
Hello I got problem with scroll on my grid. Here is the code (nothing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.