comparison hgext/evolve.py @ 1115:cc19b6400dae stable

import: fix the "is None" check for the Node We are checking the wrong variable.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 30 Sep 2014 10:27:54 -0500
parents 212f24013455
children 98f4e356a431
comparison
equal deleted inserted replaced
1110:875e671c3cd8 1115:cc19b6400dae
1009 1009
1010 @eh.wrapfunction(mercurial.cmdutil, 'tryimportone') 1010 @eh.wrapfunction(mercurial.cmdutil, 'tryimportone')
1011 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs): 1011 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs):
1012 extracted = patch.extract(ui, hunk) 1012 extracted = patch.extract(ui, hunk)
1013 expected = extracted[5] 1013 expected = extracted[5]
1014 if extracted is not None: 1014 if expected is not None:
1015 expected = node.bin(expected) 1015 expected = node.bin(expected)
1016 oldextract = patch.extract 1016 oldextract = patch.extract
1017 try: 1017 try:
1018 patch.extract = lambda ui, hunk: extracted 1018 patch.extract = lambda ui, hunk: extracted
1019 ret = orig(ui, repo, hunk, parents, opts, *args, **kwargs) 1019 ret = orig(ui, repo, hunk, parents, opts, *args, **kwargs)