# HG changeset patch # User Augie Fackler # Date 2013-10-07 21:47:55 # Node ID 7032dcff290ce49c9e2c0a78ddc003e1520cfcce # Parent 5836edcbdc2e4c5bd97a50db512191b98c2d69d8 # Parent c172660eee01af28b8f843a9f7a568a4de5bb084 merge with stable diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -14,7 +14,7 @@ import email.Generator import email.Parser from i18n import _ -from node import hex, nullid, short +from node import hex, short import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, error import context @@ -1662,7 +1662,7 @@ def trydiff(repo, revs, ctx1, ctx2, modi def gitindex(text): if not text: - return hex(nullid) + text = "" l = len(text) s = util.sha1('blob %d\0' % l) s.update(text) diff --git a/tests/test-diff-upgrade.t b/tests/test-diff-upgrade.t --- a/tests/test-diff-upgrade.t +++ b/tests/test-diff-upgrade.t @@ -183,7 +183,7 @@ git=auto: regular diff for regular files % git=auto: git diff for newbinary diff --git a/newbinary b/newbinary new file mode 100644 - index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d + index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 Ic${MZ000310RR91 @@ -200,7 +200,7 @@ git=auto: regular diff for regular files % git=auto: git diff for rmbinary diff --git a/rmbinary b/rmbinary deleted file mode 100644 - index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000 + index f76dd238ade08917e6712764a16a22005a50573d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch literal 0 Hc$@