comparison hgext/convert/cvsps.py @ 51146:de9cbc5a1450 stable

py3: pass unicode strings to hasattr() throughout I guess we missed these instances because they're not covered by tests. This is a graft of 1625fe807c04a490f9516bc8e14140e570c06146 that landed on default.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 13 Nov 2023 09:19:11 -0800
parents d718eddf01d9
children 1eab9e40c0c8
comparison
equal deleted inserted replaced
51132:d45afa07564c 51146:de9cbc5a1450
196 try: 196 try:
197 ui.note(_(b'reading cvs log cache %s\n') % cachefile) 197 ui.note(_(b'reading cvs log cache %s\n') % cachefile)
198 oldlog = pickle.load(open(cachefile, b'rb')) 198 oldlog = pickle.load(open(cachefile, b'rb'))
199 for e in oldlog: 199 for e in oldlog:
200 if not ( 200 if not (
201 hasattr(e, b'branchpoints') 201 hasattr(e, 'branchpoints')
202 and hasattr(e, b'commitid') 202 and hasattr(e, 'commitid')
203 and hasattr(e, b'mergepoint') 203 and hasattr(e, 'mergepoint')
204 ): 204 ):
205 ui.status(_(b'ignoring old cache\n')) 205 ui.status(_(b'ignoring old cache\n'))
206 oldlog = [] 206 oldlog = []
207 break 207 break
208 208