@matheusbsbs / matheus-bagliano / commits / 709b148a90
Fork 0

gitview: Use new-style classes

This changes the Commit class to use new-style class, which has been available since Python 2.2 (Dec 2001). This is a necessary step in order to use __slots__[] declaration, so that we can reduce the memory footprint in the next patch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Ellerman committed May 30, 2007 at 14:47 UTC 709b148a907e68bfb57808de8f65b186cc9a5e21
1 file changed +4 -4
contrib/gitview/gitview
+4 -4
@@ -259,7 +259,7 @@ class CellRendererGraph(gtk.GenericCellRenderer):
259 self.set_colour(ctx, colour, 0.0, 0.5)
260 ctx.show_text(name)
261
262 -class Commit:
262 +class Commit(object):
263 """ This represent a commit object obtained after parsing the git-rev-list
264 output """
265
@@ -339,7 +339,7 @@ class Commit:
339 fp.close()
340 return diff
341
342 -class AnnotateWindow:
342 +class AnnotateWindow(object):
343 """Annotate window.
344 This object represents and manages a single window containing the
345 annotate information of the file
@@ -519,7 +519,7 @@ class AnnotateWindow:
519 self.io_watch_tag = gobject.io_add_watch(fp, gobject.IO_IN, self.data_ready)
520
521
522 -class DiffWindow:
522 +class DiffWindow(object):
523 """Diff window.
524 This object represents and manages a single window containing the
525 differences between two revisions on a branch.
@@ -674,7 +674,7 @@ class DiffWindow:
674 fp.close()
675 dialog.destroy()
676
677 -class GitView:
677 +class GitView(object):
678 """ This is the main class
679 """
680 version = "0.9"