remote-helpers: avoid has_key
authorDusty Phillips <dusty@linux.ca>
Mon, 22 Apr 2013 21:55:09 +0000 (16:55 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Apr 2013 22:25:53 +0000 (15:25 -0700)
It is deprecated.

[fc: do the same in remote-bzr]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-bzr
contrib/remote-helpers/git-remote-hg

index aa7bc97beecc6af7adca5b6886d8e7c61f9173b1..cc6609b2f8b74f26a3edae2603ebf8196310c06f 100755 (executable)
@@ -94,7 +94,7 @@ class Marks:
         return self.last_mark
 
     def is_marked(self, rev):
-        return self.marks.has_key(rev)
+        return str(rev) in self.marks
 
     def new_mark(self, rev, mark):
         self.marks[rev] = mark
index 548133121d23a328d76d68d058fd4fb14b60fb16..2cd199662632b1e9873adc32a5c201f42c27fcd2 100755 (executable)
@@ -129,7 +129,7 @@ class Marks:
         self.last_mark = mark
 
     def is_marked(self, rev):
-        return self.marks.has_key(str(rev))
+        return str(rev) in self.marks
 
     def get_tip(self, branch):
         return self.tips.get(branch, 0)