Changeset 67d19149537f…
Parent f0fe708a7d75…
by Benjamin Pollack <benjamin@fogcreek.com>
Changes to 5 files · Browse files at 67d19149537f Showing diff from parent f0fe708a7d75 Diff from another changeset...
@@ -472,7 +472,11 @@ def httpsendfile(ui, filename):
try:
# Mercurial >= 1.9
- return httpconnection.httpsendfile(ui, filename, 'rb')
+ sendfile = httpconnection.httpsendfile(ui, filename, 'rb')
+ if getattr(sendfile, '__len__', None) is None:
+ # Mercurial 1.9.3 removes httpsendfile's __len__. Hack it back in.
+ setattr(sendfile.__class__, '__len__', lambda self: self.length)
+ return sendfile
except ImportError:
if 'ui' in inspect.getargspec(url_.httpsendfile.__init__)[0]:
# Mercurial == 1.8
|
@@ -19,16 +19,12 @@ from mercurial import cmdutil, commands, hg, extensions
from mercurial.i18n import _
-try:
- from mercurial import discovery
-except ImportError:
- pass
-
max_push_size = 1000
def findoutgoing(repo, other):
try:
# Mercurial 1.6 through 1.8
+ from mercurial import discovery
return discovery.findoutgoing(repo, other, force=False)
except AttributeError:
# Mercurial 1.9 and higher
|
@@ -53,6 +53,7 @@
from mercurial.i18n import _
import mercurial.url
+from mercurial import commands
current_user = None
@@ -205,7 +206,7 @@ return urlopener
mercurial.url.opener = opener
-def logout(ui, repo, domain=None):
+def logout(ui, domain=None):
"""log out of http repositories
Clears the cookies stored for HTTP repositories. If [domain] is
@@ -220,6 +221,8 @@ except KeyError:
ui.write("Not logged in to '%s'\n" % (domain,))
+commands.norepo += ' logout'
+
cmdtable = {
'logout': (logout, [], '[domain]')
}
|
@@ -1,11 +1,10 @@ import compileall
import os
-import win32api
import zipfile
folders = ['bfiles', '_custom']
extensions = ['.py']
-excludes = ['\\setup.py']
+excludes = ['setup.py']
def compile_extensions():
compileall.compile_dir(os.path.dirname(__file__), force=1)
@@ -42,7 +41,7 @@ files = list_files(absdir, '.')
print 'Creating ZIP archive...'
- zip = zipfile.ZipFile(absdir + '\kiln_extensions.zip', 'w')
+ zip = zipfile.ZipFile(os.path.join(absdir, 'kiln_extensions.zip'), 'w')
for file in files:
zip.write(file[0], file[1])
zip.close()
|
Loading...