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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:10:37+00:00 2026-05-26T04:10:37+00:00

I have several -small- binary files added in my Mercurial repository. The files are

  • 0

I have several -small- binary files added in my Mercurial repository. The files are the “source” files of one of my development tools (report / form / class definitions).

I made a program that dumps this binary files to a text file to allow easy diffs between them. Is there any way to tell Mercurial that certain file extensions need to run this conversion before running the diff program? Or I have to set my conversion program as the main diff tool and run the conversion -or not- and then run the real diff program?

  • 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-26T04:10:38+00:00Added an answer on May 26, 2026 at 4:10 am

    I ended up with a small batch previous to the diff program:

    @echo off
    set f1=%1
    set f2=%2
    ::Temporary dir created by hg to copy the snapshot file
    set tdir=%~dp1
    ::Original repository dir
    set repo=%~dp2
    ::Filename extension
    set ext=%~x1
    ::The binary files comes in pairs: scx/sct \ vcx/vct ...
    set ex2=%ext:~0,-1%t
    
    ::Check if "dumpable" extension
    echo %ext% | grep -iE "(vcx|vct|scx|sct|pjx|pjt|frx|frt)" > nul && goto DumpFile
    goto diff
    
    :DumpFile
    set f1="%tdir%\_Dump1.prg"
    set f2="%tdir%\_Dump2.prg"
    ::Get the pair file from the repository
    hg cat %repo%\%~n1%ex2% -o "%~dpn1%ex2%" -R %repo%
    
    ::Do the dump, then the diff
    MyDumpProgram.exe %1 %f1%
    MyDumpProgram.exe %2 %f2%
    goto diff
    
    :diff
    ExamDiff.exe %f1% %f2%
    pause
    

    and then config the batch in %UserProfile%\.hgrc

    [extdiff]
    cmd.ediff = d:\Utiles\diff2.bat
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a canvas with several small canvases on it. Like this: public class
I have a binary image of several connected components, some large and some small
I have a small wxWidget application that uses image files at several places. I
Situation: We have several small icons on our Magento Product page. After clicking one,
I have several small open-source projects that I wrote. All my attempts to find
I have several small classes that are in a single file in /app/models, similar
Suppose I have several small test cases. Easy enough to setup and easy enough
I have spent several days now researching Hibernate and have several small questions about
I have a small website with several PDFs free for download. I use StatCounter
I have several xml files with different node structure. I want to extract xml

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.