[PATCH] largefiles: call super class method with proper kwargs to respect API
Long Vu
long at tlvu.ca
Tue Dec 3 13:12:17 CST 2013
# HG changeset patch
# User Long Vu <long at tlvu.ca>
# Date 1386095284 18000
# Tue Dec 03 13:28:04 2013 -0500
# Node ID 578ea1b0a8e2ed1f88c82cbb37c236f993508a85
# Parent 1c92524c37cdd251c1a36b2da0fb4148b0e6ba09
largefiles: call super class method with proper kwargs to respect API
Since the localrepositoyry.push() method in mercurial/localrepo.py is defined
this way:
def push(self, remote, force=False, revs=None, newbranch=False):
it is better for largefiles to call push() on the super class with proper
kwargs to respect the API.
This will avoid breaking other extensions overriding the push method this way:
def push(self, remote, force=False, **kwargs):
diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -445,8 +445,8 @@
for f in files
if lfutil.isstandin(f) and f in ctx]))
lfcommands.uploadlfiles(ui, self, remote, toupload)
- return super(lfilesrepo, self).push(remote, force, revs,
- newbranch)
+ return super(lfilesrepo, self).push(remote, force=force, revs=revs,
+ newbranch=newbranch)
def _subdirlfs(self, files, lfiles):
'''
More information about the Mercurial-devel
mailing list