[fastmanifest] rename save to _save

Summary: It's not for public consumption.

Test Plan: run `PYTHONPATH=~/work/mercurial/facebook-hg-rpms/remotenames/:~/work/mercurial/facebook-hg-rpms/mutable-history/hgext  python ~/work/mercurial/facebook-hg-rpms/hg-crew/tests/run-tests.py -j32 test-fastmanifest*.{py,t}`

Reviewers: simonfar, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3471404

Tasks: 11375421

Signature: t1:3471404:1466694921:2ec80e6ca3b460cc42cc766af96d9551f9100c75
This commit is contained in:
Tony Tung 2016-06-23 13:42:24 -07:00
parent e47030aa54
commit 520195e68c
2 changed files with 2 additions and 2 deletions

View File

@ -730,7 +730,7 @@ static PyMethodDef fastmanifest_methods[] = {
"Make a copy of this fastmanifest."},
{"filtercopy", (PyCFunction)fastmanifest_filtercopy, METH_O,
"Make a copy of this manifest filtered by matchfn."},
{"save", (PyCFunction)fastmanifest_save, METH_VARARGS,
{"_save", (PyCFunction)fastmanifest_save, METH_VARARGS,
"Save a fastmanifest to a file"},
{"load", (PyCFunction)fastmanifest_load, METH_VARARGS | METH_CLASS,
"Load a tree manifest from a file"},

View File

@ -470,7 +470,7 @@ class ondiskcache(object):
fm = cfastmanifest.fastmanifest(manifest.text())
tmpfpath = util.mktempcopy(path, True)
try:
fm.save(tmpfpath)
fm._save(tmpfpath)
entrysize = os.path.getsize(tmpfpath)
if limit and self.totalsize()[0] + entrysize > limit:
return False