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 6018093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:13:29+00:00 2026-05-23T03:13:29+00:00

Let´s say I have two branches, default and mybranch, I would like to write

  • 0

Let´s say I have two branches, default and mybranch, I would like to write a small script to see:

  1. How often mybranch merges with default (changes goes from mybranch to default)
  2. How often mybranch merges from default (changes goes from default into mybranch)

Some pseudocode for #1:

    m_lastmergetime = 0
    for each m in [all merges with default from mybranch]
        m_mergetime = m.date_in_hours
        m_timebetweenmerges = m_mergetime - m_lastmergetime
        if m_lastmergetime > 0
            print m_timebetweenmerges

Sub.steps:

  1. A Mercurial query which matches all merges with default from mybranch
  2. A style for Mercurial which shows the date in hours
  3. Calculate the time between merges as in the above pseudocode using Bash or Python

Case #2 will be pretty similar. I only need:

  1. A Mercurial query which matches all merges with mybranch from default
  • 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-23T03:13:30+00:00Added an answer on May 23, 2026 at 3:13 am

    To find all the changesets on branch X that was merged in from branch Y you would issue the following Mercurial command:

    hg log --rev "children(branch(X)) and children(branch(Y)) and branch(X)"
    

    To find everything on branch Y that was merged in from branch X (ie. the opposite direction), simply change the last branch name there to Y:

    hg log --rev "children(branch(X)) and children(branch(Y)) and branch(Y)"
                                  ^                       ^              ^
                                  +------ leave these ----+              |
                                                                         |
                                          but change this ---------------+
    

    Basically the query says that you want all changesets that:

    • is a child of any of the changesets on branch X
    • is also a child of any of the changesets on branch Y (only merge changesets have two parents, and can thus be a child of changesets on two branches at the same time)
    • is on branch Y (so you merged to branch Y)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have two branches named default and newfeature . I have a
I need to write an anaglyph images program. Let say I have two mono-color
Let's say I have two files.. I want to compare them side-by-side and see
Let's say I have two anonymous objects like this: var objA = new {
Let's say I have two classes that look like this: public class ByteFilter {
Let's say you have two selectors like this: $(.class1, .class2).click(function() { $(this).hide(); }); It
Let's say I have two models, Classes and People. A Class might have one
Let's say I have two arrays: int ArrayA[] = {5, 17, 150, 230, 285};
Let's say I have two tables: Report Comment And assuming I have a database
Let's say I have two existing tables, dogs and cats: dog_name | owner ---------+------

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.