diff -r 624fe53ce1e7 -r 5d85e9ddc7b9 hgext/phabricator.py --- a/hgext/phabricator.py Wed Jan 22 20:01:38 2020 -0800 +++ b/hgext/phabricator.py Sat Jan 25 01:06:46 2020 -0500 @@ -747,11 +747,11 @@ return fphid -def addoldbinary(pchange, fctx, originalfname): +def addoldbinary(pchange, fctx): """add the metadata for the previous version of a binary file to the phabchange for the new version """ - oldfctx = fctx.p1()[originalfname] + oldfctx = fctx.p1() if fctx.cmp(oldfctx): # Files differ, add the old one pchange.metadata[b'old:file:size'] = oldfctx.size() @@ -832,7 +832,7 @@ if fctx.isbinary() or notutf8(fctx): makebinary(pchange, fctx) - addoldbinary(pchange, fctx, fname) + addoldbinary(pchange, fctx) else: maketext(pchange, ctx, fname)