Patchwork [4,of,4] largefiles: cleanup overrideadd()

login
register
mail settings
Submitter Matt Harbison
Date Jan. 16, 2015, 3:39 a.m.
Message ID <3282db289c9ef93575c6.1421379596@Envy>
Download mbox | patch
Permalink /patch/7480/
State Accepted
Headers show

Comments

Matt Harbison - Jan. 16, 2015, 3:39 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1421119812 18000
#      Mon Jan 12 22:30:12 2015 -0500
# Node ID 3282db289c9ef93575c68100c107c39c834e5061
# Parent  46fd3fdff1e68afbc4b66ed1960d696ed5e67124
largefiles: cleanup overrideadd()

This was a remnant of the code prior to overridding cmdutil.add().
Pierre-Yves David - Jan. 16, 2015, 9:29 a.m.
On 01/15/2015 07:39 PM, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1421119812 18000
> #      Mon Jan 12 22:30:12 2015 -0500
> # Node ID 3282db289c9ef93575c68100c107c39c834e5061
> # Parent  46fd3fdff1e68afbc4b66ed1960d696ed5e67124
> largefiles: cleanup overrideadd()

I've moved forward and these four are pushed to the Clowncopter.

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -243,10 +243,8 @@ 
 # -- Wrappers: modify existing commands --------------------------------
 
 def overrideadd(orig, ui, repo, *pats, **opts):
-    normal = opts.get('normal')
-    if normal:
-        if opts.get('large'):
-            raise util.Abort(_('--normal cannot be used with --large'))
+    if opts.get('normal') and opts.get('large'):
+        raise util.Abort(_('--normal cannot be used with --large'))
     return orig(ui, repo, *pats, **opts)
 
 def cmdutiladd(orig, ui, repo, matcher, prefix, explicitonly, **opts):