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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:22:30+00:00 2026-06-06T02:22:30+00:00

We have a 2,000,000 lines of code application in Mercurial. Obviously there is a

  • 0

We have a 2,000,000 lines of code application in Mercurial. Obviously there is a lot of valuable information inside this repository.

Are there any tools or techniques to dig out some of that information?

For instance, over the history of the project, what five files have seen the most changes? What five files are the most different from what they were one year ago? Any particular lines of code seen a lot of churn?

I’m interested in that sort of thing and more.

Is there a way to extract this kind of information from our repository?

  • 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-06-06T02:22:31+00:00Added an answer on June 6, 2026 at 2:22 am

    I don’t know of any tools specifically made for doing this, but Mercurial’s log templates are very powerful for getting data out of the system. I’ve done a bit of this sort of analysis in the past, and my approach was:

    1. Use hg log to dump commits to some convenient format (xml in my case)
    2. Write a script to import the xml into something queryable (database, or just work from the XML directly if it’s not too big)

    Here’s an example hg log command to get you going:

    mystyle.txt: (template)

    changeset = '<changeset>\n<user>{author|user}</user>\n<date>{date|rfc3339date|escape}</date>\n<files>\n{file_mods}{file_adds}{file_dels}</files>\n<rev>{node}</rev>\n<desc>{desc|strip|escape}</desc>\n<branch>{branches}</branch><diffstat>{diffstat}</diffstat></changeset>\n\n'
    file_mod = '<file action="modified">{file_mod|escape}</file>\n'
    file_add = '<file action="added">{file_add|escape}</file>\n'
    file_del = '<file action="deleted">{file_del|escape}</file>\n'
    

    Example invocation using template and date range:

    hg --repository /path/to/repo log -d "2012-01-01 to 2012-06-01" --no-merges --style mystyle.txt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ~30.000 lines of badly indented OCaml code (including mly and mll files)
I have automatic generated code (around 18,000 lines, basically a wrap of data) and
I have converted 4,000 lines of code from VB.net to c#... I am totally
I have inherited a medium sized iOS project - ~30,000 lines of code -
I work on a large C# application (approximately 450,000 lines of code), we constantly
I have large main file contains about 7,000 lines of C code. If I
I have a code of about 10,000 lines. I have to maintain a track
If I have many references such as this code snippet below throughout my application,
My problem is quite simple: I have a 400MB file filled with 10,000,000 lines
Suppose table 1 Have 1,000,000 rows. In table 2 there are 50,000 rows INPUT

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.