[PATCH] largefiles: don't break existing tests (syntax error, bad imports)

Greg Ward greg-hg at gerg.ca
Sat Oct 1 15:43:26 CDT 2011


# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1317501591 14400
# Node ID e07ea66a230ef2d418ad15b8a8d87a70a346daed
# Parent  59e8bc22506ec40f74ce192b6f0c36fb9e42d2c6
largefiles: don't break existing tests (syntax error, bad imports).

diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -484,7 +484,7 @@
 
 def islfilesrepo(repo):
     return ('largefiles' in repo.requirements and
-            any_(shortname + '/' in f[0] for f in repo.store.datafiles())
+            any_(shortname + '/' in f[0] for f in repo.store.datafiles()))
 
 def any_(gen):
     for x in gen:
diff --git a/hgext/largefiles/remotestore.py b/hgext/largefiles/remotestore.py
--- a/hgext/largefiles/remotestore.py
+++ b/hgext/largefiles/remotestore.py
@@ -7,7 +7,6 @@
 '''Remote largefile store; the base class for servestore'''
 
 import urllib2
-import HTTPError
 
 from mercurial import util
 from mercurial.i18n import _
@@ -57,7 +56,7 @@
 
         try:
             length, infile = self._get(hash)
-        except HTTPError, e:
+        except urllib2.HTTPError, e:
             # 401s get converted to util.Aborts; everything else is fine being
             # turned into a StoreError
             raise basestore.StoreError(filename, hash, self.url, str(e))
diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py
+++ b/hgext/largefiles/uisetup.py
@@ -9,7 +9,7 @@
 '''setup for largefiles extension: uisetup'''
 
 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
-        httprepo, localrepo, sshrepo, sshserver, wireproto
+    httprepo, localrepo, sshrepo, sshserver, util, wireproto
 from mercurial.i18n import _
 from mercurial.hgweb import hgweb_mod, protocol
 


More information about the Mercurial-devel mailing list