Mercurial > hg-stable
changeset 17411:a02e36568e88 stable
largefiles: adjust localstore to handle batch statlfile requests (issue3583)
This fixes a traceback when pushing to a local repo which started with
9e1616307c4c.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 14 Aug 2012 22:38:25 -0400 |
parents | 7c865f30e2b8 |
children | e169b11fa1e0 |
files | hgext/largefiles/localstore.py tests/test-largefiles.t |
diffstat | 2 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/localstore.py Fri Aug 31 23:27:26 2012 +0200 +++ b/hgext/largefiles/localstore.py Tue Aug 14 22:38:25 2012 -0400 @@ -33,8 +33,12 @@ lfutil.link(lfutil.storepath(self.repo, hash), lfutil.storepath(self.remote, hash)) - def exists(self, hash): - return lfutil.instore(self.remote, hash) + def exists(self, hashes): + retval = {} + for hash in hashes: + retval[hash] = lfutil.instore(self.remote, hash) + return retval + def _getfile(self, tmpfile, filename, hash): if lfutil.instore(self.remote, hash):
--- a/tests/test-largefiles.t Fri Aug 31 23:27:26 2012 +0200 +++ b/tests/test-largefiles.t Tue Aug 14 22:38:25 2012 -0400 @@ -1141,6 +1141,19 @@ A f1 $ cd .. +largefiles can be pushed locally (issue3583) + $ hg init dest + $ cd r4 + $ hg push ../dest + pushing to ../dest + searching for changes + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + $ cd .. + #if serve $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid $ cat hg.pid >> $DAEMON_PIDS