Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 51185:d6e5bec550f1
util: move diff_parent from logcmdutil to diffutil
This function will be used outside of the log command
(in templatekw, used by hgweb, for which logcmdutil is not available).
Let's move this function together with the rest of the diff-related
utils instead.
author | pacien <pacien.trangirard@pacien.net> |
---|---|
date | Wed, 15 Nov 2023 02:39:53 +0100 |
parents | 752c5a5b73c6 |
children | 7e6aae033d8d |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Sep 07 08:39:21 2023 +0200 +++ b/mercurial/commands.py Wed Nov 15 02:39:53 2023 +0100 @@ -29,6 +29,7 @@ copies, debugcommands as debugcommandsmod, destutil, + diffutil, discovery, encoding, error, @@ -2655,7 +2656,7 @@ if change: repo = scmutil.unhidehashlikerevs(repo, [change], b'nowarn') ctx2 = logcmdutil.revsingle(repo, change, None) - ctx1 = logcmdutil.diff_parent(ctx2) + ctx1 = diffutil.diff_parent(ctx2) elif from_rev or to_rev: repo = scmutil.unhidehashlikerevs( repo, [from_rev] + [to_rev], b'nowarn'