Wed Sep 7 16:59:52 UTC 2005 Alberto Bertogli * Support replaces. diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi --- old-darcsweb/darcsweb.cgi 2015-10-21 22:41:15.000000000 +0000 +++ new-darcsweb/darcsweb.cgi 2015-10-21 22:41:15.000000000 +0000 @@ -381,6 +381,7 @@ self.modifies = {} self.diradds = [] self.dirremoves = [] + self.replaces = {} self.moves = {} def tostr(self): @@ -485,6 +486,14 @@ dst = fixu8(attrs.get('to', None)) p = self.db[self.current] p.moves[src] = dst + elif name == 'replaced_tokens': + if self.cur_val: + self.cur_file = fixu8(self.cur_val.strip()) + cf = self.cur_file + p = self.db[self.current] + if not p.replaces.has_key(cf): + p.replaces[cf] = 0 + p.replaces[cf] = int(attrs.get('num', None)) else: self.cur_elem = None @@ -501,6 +510,8 @@ return if self.cur_elem == 'created_as': return + if name == 'replaced_tokens': + return if name == 'name': p = self.db[self.current] @@ -1079,7 +1090,7 @@ print '
', c, '
' changed = p.adds + p.removes + p.modifies.keys() + p.moves.keys() + \ - p.diradds + p.dirremoves + p.diradds + p.dirremoves + p.replaces.keys() if changed or p.moves: n = len(changed) @@ -1132,6 +1143,10 @@ print '', print '[removed dir]', print '' + elif p.replaces.has_key(f): + print '', + print '[replaced %d tokens]' % p.replaces[f], + print '' elif p.moves.has_key(f): print '', print '[moved to "%s"]' % p.moves[f]