comparison hgext/convert/cvsps.py @ 8080:19229b0b292d

cvsps: make debugging easier by adding __repr__() methods.
author Greg Ward <greg-hg@gerg.ca>
date Sat, 18 Apr 2009 09:43:21 -0400
parents fb162c47000b
children 4e5bd9b97bb3
comparison
equal deleted inserted replaced
8079:fb162c47000b 8080:19229b0b292d
36 .synthetic - is this a synthetic "file ... added on ..." revision? 36 .synthetic - is this a synthetic "file ... added on ..." revision?
37 .mergepoint- the branch that has been merged from (if present in rlog output) 37 .mergepoint- the branch that has been merged from (if present in rlog output)
38 ''' 38 '''
39 def __init__(self, **entries): 39 def __init__(self, **entries):
40 self.__dict__.update(entries) 40 self.__dict__.update(entries)
41
42 def __repr__(self):
43 return "<%s at 0x%x: %s %s>" % (self.__class__.__name__,
44 id(self),
45 self.file,
46 ".".join(map(str, self.revision)))
41 47
42 class logerror(Exception): 48 class logerror(Exception):
43 pass 49 pass
44 50
45 def getrepopath(cvspath): 51 def getrepopath(cvspath):
440 .mergepoint- the branch that has been merged from (if present in rlog output) 446 .mergepoint- the branch that has been merged from (if present in rlog output)
441 ''' 447 '''
442 def __init__(self, **entries): 448 def __init__(self, **entries):
443 self.__dict__.update(entries) 449 self.__dict__.update(entries)
444 450
451 def __repr__(self):
452 return "<%s at 0x%x: %s>" % (self.__class__.__name__,
453 id(self),
454 getattr(self, 'id', "(no id)"))
455
445 def createchangeset(ui, log, fuzz=60, mergefrom=None, mergeto=None): 456 def createchangeset(ui, log, fuzz=60, mergefrom=None, mergeto=None):
446 '''Convert log into changesets.''' 457 '''Convert log into changesets.'''
447 458
448 ui.status(_('creating changesets\n')) 459 ui.status(_('creating changesets\n'))
449 460