comparison hgext3rd/topic/discovery.py @ 2674:9585fac76d2d

topic: adjust head checking wrapping to not interfere with concurrent push In the previous form, the new topic head was detected as affected and the push was rejected. We introduce a of 'test-topic-push.t' using the new race checker as there have been many compatibility issue with this new checkers.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 28 Jun 2017 18:18:59 +0200
parents 1014341c637b
children 304232cc14b6
comparison
equal deleted inserted replaced
2673:1014341c637b 2674:9585fac76d2d
62 else: 62 else:
63 summary = orig(repo, remote, outgoing) 63 summary = orig(repo, remote, outgoing)
64 for key, value in summary.iteritems(): 64 for key, value in summary.iteritems():
65 if ':' in key: # This is a topic 65 if ':' in key: # This is a topic
66 if value[0] is None and value[1]: 66 if value[0] is None and value[1]:
67 summary[key] = ([value[1].pop(0)], ) + value[1:] 67 summary[key] = ([value[1][0]], ) + value[1:]
68 return summary 68 return summary
69 finally: 69 finally:
70 if 'unfiltered' in vars(repo): 70 if 'unfiltered' in vars(repo):
71 del repo.unfiltered 71 del repo.unfiltered
72 repo.__class__ = oldrepo 72 repo.__class__ = oldrepo