[Bug 5038] New: add a basic interdiff between two commits

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue Jan 12 09:47:59 CST 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5038

            Bug ID: 5038
           Summary: add a basic interdiff between two commits
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: timeless at gmail.com
                CC: mercurial-devel at selenic.com

When sending/reviewing v2 versions of patches, the first question is "how is
this different from what I saw before?"

The answer is often "it isn't", but it's a pain to figure that out.

Today you have to do something like:

$ hg export a5652300012404f634f56b38df51dc5218f571c0 >
a5652300012404f634f56b38df51dc5218f571c0
$ hg export 409a03fdf519243fe530f52a68f7804977dcd0e9 >
409a03fdf519243fe530f52a68f7804977dcd0e9
dabort: hidden revision '409a03fdf519243fe530f52a68f7804977dcd0e9'!
(use --hidden to access hidden revisions)
$ hg export --hidden 409a03fdf519243fe530f52a68f7804977dcd0e9 >
409a03fdf519243fe530f52a68f7804977dcd0e9 
$ diff -u 409a03fdf519243fe530f52a68f7804977dcd0e9
a5652300012404f634f56b38df51dc5218f571c0
--- 409a03fdf519243fe530f52a68f7804977dcd0e9    2016-01-12 15:40:41.200876206
+0000
+++ a5652300012404f634f56b38df51dc5218f571c0    2016-01-12 15:40:07.250149676
+0000
@@ -2,14 +2,14 @@
 # User timeless <timeless at mozdev.org>
 # Date 1452128145 0
 #      Thu Jan 07 00:55:45 2016 +0000
-# Node ID 409a03fdf519243fe530f52a68f7804977dcd0e9
-# Parent  64c42efbced150c5609d5ea1e3b7a0094d22b2d1
+# Node ID a5652300012404f634f56b38df51dc5218f571c0
+# Parent  c686621f7ac9981d33d2a7f4e6fd20a7678790f3
 check-commit: modularize

-diff -r 64c42efbced1 -r 409a03fdf519 contrib/check-commit
+diff -r c686621f7ac9 -r a56523000124 contrib/check-commit
 --- a/contrib/check-commit     Thu Jan 07 03:58:40 2016 +0000
 +++ b/contrib/check-commit     Thu Jan 07 00:55:45 2016 +0000
-@@ -33,25 +33,32 @@
+@@ -35,25 +35,32 @@
      (r"^\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"),
  ]

What should be available is:

hg interdiff REV1 REV2

it should highlight only meaningful changes (metadata excluding Node ID/Parent
ID, excluding sha's, excluding line number/offsets, excluding context,
excluding dates), just changes to the +/- portion of patch content, file status
(execbits...), and useful commit metadata (tentatively: branch, user, commit
message).

Also: if REV1 or REV2 or both are hidden, interdiff should not complain. The
purpose of this command is to compare changesets, it's likely that at least one
revision will be hidden, this is not a user error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list