This is an archive of the discontinued Mercurial Phabricator instance.

cmdutil: pass in parsed patch to tryimportone() (API)
ClosedPublic

Authored by indygreg on Apr 13 2018, 2:26 AM.

Details

Summary

Previously, we parsed the patch in tryimportone(). This assumes the
input is in a patch format that needs to be parsed. We want to support
feeding in data from other formats. So let's let the caller handle the
parsing.

One wonky thing about patch parsing is that patch.extract() creates
a temp file to hold the diffs and it is up to tryimportone() to
unlink that temp file. I'll improve this in a subsequent commit.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Apr 13 2018, 2:26 AM
This revision was automatically updated to reflect the committed changes.