Mercurial > hg
comparison hgext/bookmarks.py @ 13031:3da456d0c885
code style: prefer 'is' and 'is not' tests with singletons
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 22 Nov 2010 18:15:58 +0100 |
parents | 161fe4879bfc |
children | e41e2b79883d |
comparison
equal
deleted
inserted
replaced
13030:8ea51e9e7031 | 13031:3da456d0c885 |
---|---|
135 setcurrent(repo, None) | 135 setcurrent(repo, None) |
136 del marks[mark] | 136 del marks[mark] |
137 write(repo) | 137 write(repo) |
138 return | 138 return |
139 | 139 |
140 if mark != None: | 140 if mark is not None: |
141 if "\n" in mark: | 141 if "\n" in mark: |
142 raise util.Abort(_("bookmark name cannot contain newlines")) | 142 raise util.Abort(_("bookmark name cannot contain newlines")) |
143 mark = mark.strip() | 143 mark = mark.strip() |
144 if not mark: | 144 if not mark: |
145 raise util.Abort(_("bookmark names cannot consist entirely of " | 145 raise util.Abort(_("bookmark names cannot consist entirely of " |