Mercurial > evolve
comparison hgext/evolve.py @ 1512:c40108ae8fb0
merge with stable
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 12 Oct 2015 01:23:59 -0700 |
parents | b86eea66ed02 91b6a30424a3 |
children | 4f7e0e0318a5 |
comparison
equal
deleted
inserted
replaced
1510:b86eea66ed02 | 1512:c40108ae8fb0 |
---|---|
1038 'the created commit'))) | 1038 'the created commit'))) |
1039 | 1039 |
1040 @eh.wrapfunction(mercurial.cmdutil, 'tryimportone') | 1040 @eh.wrapfunction(mercurial.cmdutil, 'tryimportone') |
1041 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs): | 1041 def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs): |
1042 extracted = patch.extract(ui, hunk) | 1042 extracted = patch.extract(ui, hunk) |
1043 expected = extracted[5] | 1043 if util.safehasattr(extracted, 'get'): |
1044 # mercurial 3.6 return a dictionary there | |
1045 expected = extracted.get('nodeid') | |
1046 else: | |
1047 expected = extracted[5] | |
1044 if expected is not None: | 1048 if expected is not None: |
1045 expected = node.bin(expected) | 1049 expected = node.bin(expected) |
1046 oldextract = patch.extract | 1050 oldextract = patch.extract |
1047 try: | 1051 try: |
1048 patch.extract = lambda ui, hunk: extracted | 1052 patch.extract = lambda ui, hunk: extracted |