comparison hgext/largefiles/overrides.py @ 18721:2dc7f63181b9 stable

largefiles: fix off-by-one error on pull --all-largefiles Test output is changed in a case where one revision was pulled, but because of the off-by-one error it thought that 0 revisions were pulled ... and because of another bug it thus (tried to) fetch largefiles for all revisions. After this change it no longer reports failure when it failed while trying to fetch largefiles it shouldn't fetch. Largefiles that it shouldn't fetch but managed to fetch anyway will now correctly be missing later on. This change thus resolves some of unexplained test output introduced in 1e4eb1faba6e.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 28 Feb 2013 13:44:22 +0100
parents b7da9c042b9e
children 1e636f7b1cfe
comparison
equal deleted inserted replaced
18701:61c8327ced50 18721:2dc7f63181b9
744 numcached += len(cached) 744 numcached += len(cached)
745 ui.status(_("%d largefiles cached\n") % numcached) 745 ui.status(_("%d largefiles cached\n") % numcached)
746 if opts.get('all_largefiles'): 746 if opts.get('all_largefiles'):
747 revspostpull = len(repo) 747 revspostpull = len(repo)
748 revs = [] 748 revs = []
749 for rev in xrange(revsprepull + 1, revspostpull): 749 for rev in xrange(revsprepull, revspostpull):
750 revs.append(repo[rev].rev()) 750 revs.append(repo[rev].rev())
751 lfcommands.downloadlfiles(ui, repo, revs) 751 lfcommands.downloadlfiles(ui, repo, revs)
752 return result 752 return result
753 753
754 def overrideclone(orig, ui, source, dest=None, **opts): 754 def overrideclone(orig, ui, source, dest=None, **opts):