bookmarks: replace var used as a Boolean with a Boolean
authorMartin Geisler <mg@aragost.com>
Tue, 10 Aug 2010 16:55:38 +0200
changeset 11774 91c4e6d2c9e5
parent 11773 6a5e159eb93e
child 11775 a8614c5a5e9a
bookmarks: replace var used as a Boolean with a Boolean
hgext/bookmarks.py
--- a/hgext/bookmarks.py	Mon Aug 09 16:55:53 2010 -0500
+++ b/hgext/bookmarks.py	Tue Aug 10 16:55:38 2010 +0200
@@ -299,7 +299,7 @@
 
             self.ui.debug("checking for updated bookmarks\n")
             rb = remote.listkeys('bookmarks')
-            changes = 0
+            changed = False
             for k in rb.keys():
                 if k in self._bookmarks:
                     nr, nl = rb[k], self._bookmarks[k]
@@ -310,12 +310,12 @@
                             continue
                         if cr in cl.descendants():
                             self._bookmarks[k] = cr.node()
-                            changes += 1
+                            changed = True
                             self.ui.status(_("updating bookmark %s\n") % k)
                         else:
                             self.ui.warn(_("not updating divergent"
                                            " bookmark %s\n") % k)
-            if changes:
+            if changed:
                 write(repo)
 
             return result