Mercurial > hg-stable
changeset 29355:85868ecf2c0d
largefiles: make storefactory._openstore public
In storefactory opening store is the main functionality,
so it shouldn't be marked as private with underscore.
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Tue, 14 Jun 2016 11:21:41 +0200 |
parents | af849596752c |
children | 93b83ef78d1e |
files | hgext/largefiles/lfcommands.py hgext/largefiles/overrides.py hgext/largefiles/storefactory.py |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Mon Jun 13 23:50:26 2016 +0200 +++ b/hgext/largefiles/lfcommands.py Tue Jun 14 11:21:41 2016 +0200 @@ -356,7 +356,7 @@ if not files: return - store = storefactory._openstore(rsrc, rdst, put=True) + store = storefactory.openstore(rsrc, rdst, put=True) at = 0 ui.debug("sending statlfile command for %d largefiles\n" % len(files)) @@ -387,7 +387,7 @@ else: revs = ['.'] - store = storefactory._openstore(repo) + store = storefactory.openstore(repo) return store.verify(revs, contents=contents) def cachelfiles(ui, repo, node, filelist=None): @@ -413,7 +413,7 @@ toget.append((lfile, expectedhash)) if toget: - store = storefactory._openstore(repo) + store = storefactory.openstore(repo) ret = store.get(toget) return ret
--- a/hgext/largefiles/overrides.py Mon Jun 13 23:50:26 2016 +0200 +++ b/hgext/largefiles/overrides.py Tue Jun 14 11:21:41 2016 +0200 @@ -1123,7 +1123,7 @@ lfhashes.add(lfhash) lfutil.getlfilestoupload(repo, missing, dedup) if lfhashes: - lfexists = storefactory._openstore(repo, other).exists(lfhashes) + lfexists = storefactory.openstore(repo, other).exists(lfhashes) for fn, lfhash in knowns: if not lfexists[lfhash]: # lfhash doesn't exist on "other" addfunc(fn, lfhash) @@ -1352,7 +1352,7 @@ else: hash = lfutil.readstandin(repo, lf, ctx.rev()) if not lfutil.inusercache(repo.ui, hash): - store = storefactory._openstore(repo) + store = storefactory.openstore(repo) success, missing = store.get([(lf, hash)]) if len(success) != 1: raise error.Abort(
--- a/hgext/largefiles/storefactory.py Mon Jun 13 23:50:26 2016 +0200 +++ b/hgext/largefiles/storefactory.py Tue Jun 14 11:21:41 2016 +0200 @@ -22,7 +22,7 @@ # During clone this function is passed the src's ui object # but it needs the dest's ui object so it can read out of # the config file. Use repo.ui instead. -def _openstore(repo, remote=None, put=False): +def openstore(repo, remote=None, put=False): ui = repo.ui if not remote: