comparison mercurial/httprepo.py @ 13006:ea68947ad0ce stable

httprepo: remove is-comparison with string literal An identity check between a variable and a string literal was added to the pushkey implementation in 6bd9778ae749. While CPython will normally intern strings and thus make the test safe, value identity is what should be used here.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 16 Nov 2010 21:35:58 +0100
parents 6bd9778ae749
children bda5f35fbf67
comparison
equal deleted inserted replaced
13000:417f3c27983b 13006:ea68947ad0ce
66 66
67 def lock(self): 67 def lock(self):
68 raise util.Abort(_('operation not supported over http')) 68 raise util.Abort(_('operation not supported over http'))
69 69
70 def _callstream(self, cmd, **args): 70 def _callstream(self, cmd, **args):
71 if cmd is 'pushkey': 71 if cmd == 'pushkey':
72 args['data'] = '' 72 args['data'] = ''
73 data = args.pop('data', None) 73 data = args.pop('data', None)
74 headers = args.pop('headers', {}) 74 headers = args.pop('headers', {})
75 self.ui.debug("sending %s command\n" % cmd) 75 self.ui.debug("sending %s command\n" % cmd)
76 q = {"cmd": cmd} 76 q = {"cmd": cmd}