Hg: how to get diff of two different files?

hypercodeplace

I'm sorry if it's odd question. I have a mercurial repository. Is it possible to get a diff of two different files from some revision by hg? For example, there is a revision

revision xxx
    - file1
    - file2

How I can get a diff of file1 and file2 by standard hg command or any extensions?

Thank you.

UPD I would like something like this:

hg diff -r xxx file1 file2

Than I will have all changes between two files of same revision.

planetmaker

Initially I read your question differently, but your comment made clear that you are asking about the differences between two files of the same revision. That's nothing where the VCS has any stakes in.

You simply can use (on *nix systems) the diff command:

diff FILE1 FILE2

If you need the difference of the files at particular revisions, of course you can use mercurial before that in order to get to that:

hg update -rXXX

or even to see the difference of FILE1 at revision XXX compared to FILE2 at revision YYY (but beware, it changes the working dir content; make sure to undo the revert afterwards):

hg revert -rXXX FILE1
hg revert -rYYY FILE2
diff FILE1 FILE2

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Hg diff with multiple files

From Dev

How can I diff two files and get what is different in the second one as an output

From Dev

Git diff-how to get different files(only name) between two tags by git diff and order by the file commit time

From Dev

How to include files only of certain type into hg diff output

From Dev

How to include files only of certain type into hg diff output

From Dev

hg diff on MySQL Workbench files

From Dev

Compare/Diff two files with different line terminators

From Dev

How To Recursivley Diff Files With Different Names

From Dev

How to compare two columns of two different files

From Dev

How to diff two folders to multiple patch files

From Dev

How can I "diff" two files with Nautilus?

From Dev

How to diff the two files using Python Generator

From Dev

How can I diff two XML files?

From Dev

How to diff two folders to multiple patch files

From Dev

How can I "diff" two files with Nautilus?

From Dev

How to diff only the first line of two files?

From Dev

how to get matched records from two input files with different length of both files in awk?

From Dev

Does diff list all different lines after comparing two files?

From Dev

tool or technique to get a diff of two different linux installations

From Dev

How to push to a different branch with hg-git?

From Dev

How to push to a different branch with hg-git?

From Dev

How to deal with old files in hg repo

From Dev

linux shell diff two files to get new line

From Dev

Diff of two pdf files?

From Dev

How to get each value of variables which have the same name from two different JS files?

From Java

How to compare files from two different branches?

From Dev

How alike/different are two binary files

From Dev

Mercurial HG pull specific "no changes" yet files different

From Dev

When comparing text files with diff, it marks two identical files as different, why?

Related Related

  1. 1

    Hg diff with multiple files

  2. 2

    How can I diff two files and get what is different in the second one as an output

  3. 3

    Git diff-how to get different files(only name) between two tags by git diff and order by the file commit time

  4. 4

    How to include files only of certain type into hg diff output

  5. 5

    How to include files only of certain type into hg diff output

  6. 6

    hg diff on MySQL Workbench files

  7. 7

    Compare/Diff two files with different line terminators

  8. 8

    How To Recursivley Diff Files With Different Names

  9. 9

    How to compare two columns of two different files

  10. 10

    How to diff two folders to multiple patch files

  11. 11

    How can I "diff" two files with Nautilus?

  12. 12

    How to diff the two files using Python Generator

  13. 13

    How can I diff two XML files?

  14. 14

    How to diff two folders to multiple patch files

  15. 15

    How can I "diff" two files with Nautilus?

  16. 16

    How to diff only the first line of two files?

  17. 17

    how to get matched records from two input files with different length of both files in awk?

  18. 18

    Does diff list all different lines after comparing two files?

  19. 19

    tool or technique to get a diff of two different linux installations

  20. 20

    How to push to a different branch with hg-git?

  21. 21

    How to push to a different branch with hg-git?

  22. 22

    How to deal with old files in hg repo

  23. 23

    linux shell diff two files to get new line

  24. 24

    Diff of two pdf files?

  25. 25

    How to get each value of variables which have the same name from two different JS files?

  26. 26

    How to compare files from two different branches?

  27. 27

    How alike/different are two binary files

  28. 28

    Mercurial HG pull specific "no changes" yet files different

  29. 29

    When comparing text files with diff, it marks two identical files as different, why?

HotTag

Archive