[pygobject/pygi] make the overrides file git friendly by appending to __all__ after each override



commit 4fe0d94c219deb69a2309693202309c53a0e5e69
Author: John (J5) Palmieri <johnp redhat com>
Date:   Tue Jun 22 11:50:30 2010 -0400

    make the overrides file git friendly by appending to __all__ after each override
    
    * modifying the __all__ line for each override would confuse git as
      each override needs to get seperate approval before comitting.  Because of
      this commits would not always go in in the same order as they are created.
      Also different people working on the same file would start from different
      commit states.  This caused conflicts when patches were merged.
    * instead of modifying a single hard coded list we now append to the list
      after each override.  This creates distinct blocks of changed text
      which will not conflict

 gi/overrides/GIMarshallingTests.py |   10 ++++------
 gi/overrides/Gdk.py                |    8 ++++----
 gi/overrides/Gtk.py                |    7 +++++--
 3 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/gi/overrides/GIMarshallingTests.py b/gi/overrides/GIMarshallingTests.py
index 1ff9147..768efd7 100644
--- a/gi/overrides/GIMarshallingTests.py
+++ b/gi/overrides/GIMarshallingTests.py
@@ -23,9 +23,10 @@ from ..importer import modules
 
 GIMarshallingTests = modules['GIMarshallingTests']
 
+__all__ = []
 
 OVERRIDES_CONSTANT = 7
-
+__all__.append('OVERRIDES_CONSTANT')
 
 class OverridesStruct(GIMarshallingTests.OverridesStruct):
 
@@ -40,7 +41,7 @@ class OverridesStruct(GIMarshallingTests.OverridesStruct):
         return GIMarshallingTests.OverridesStruct.method(self) / 7
 
 OverridesStruct = override(OverridesStruct)
-
+__all__.append('OverridesStruct')
 
 class OverridesObject(GIMarshallingTests.OverridesObject):
 
@@ -63,7 +64,4 @@ class OverridesObject(GIMarshallingTests.OverridesObject):
         return GIMarshallingTests.OverridesObject.method(self) / 7
 
 OverridesObject = override(OverridesObject)
-
-
-__all__ = ['OVERRIDES_CONSTANT', 'OverridesStruct', 'OverridesObject']
-
+__all__.append('OverridesObject')
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index ac735c6..34d3a10 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -24,6 +24,7 @@ from ..importer import modules
 
 Gdk = modules['Gdk']
 
+__all__ = []
 
 class Rectangle(Gdk.Rectangle):
 
@@ -42,7 +43,7 @@ class Rectangle(Gdk.Rectangle):
 		    self.x, self.y, self.width, self.height)
 
 Rectangle = override(Rectangle)
-
+__all__.append('Rectangle')
 
 class Color(Gdk.Color):
 
@@ -59,15 +60,14 @@ class Color(Gdk.Color):
         return '<Gdk.Color(red=%d, green=%d, blue=%d)>' % (self.red, self.green, self.blue)
 
 Color = override(Color)
+__all__.append('Color')
 
 class Drawable(Gdk.Drawable):
     def cairo_create(self):
         return Gdk.cairo_create(self)
 
 Drawable = override(Drawable)
-
-__all__ = ['Rectangle', 'Color', 'Drawable']
-
+__all__.append('Drawable')
 
 
 import sys
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index a486612..3e3ab4d 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -26,6 +26,7 @@ from ..types import override
 from ..importer import modules
 
 Gtk = modules['Gtk']
+__all__ = []
 
 class ActionGroup(Gtk.ActionGroup):
     def add_actions(self, entries):
@@ -179,6 +180,7 @@ class ActionGroup(Gtk.ActionGroup):
             first_action.connect('changed', on_change)
 
 ActionGroup = override(ActionGroup)
+__all__.append('ActionGroup')
 
 class UIManager(Gtk.UIManager):
     def add_ui_from_string(self, buffer):
@@ -190,6 +192,7 @@ class UIManager(Gtk.UIManager):
         return Gtk.UIManager.add_ui_from_string(self, buffer, length)
 
 UIManager = override(UIManager)
+__all__.append('UIManager')
 
 class Builder(Gtk.Builder):
 
@@ -239,6 +242,7 @@ class Builder(Gtk.Builder):
         return Gtk.Builder.add_objects_from_string(self, buffer, length, object_ids)
 
 Builder = override(Builder)
+__all__.append('Builder')
 
 class Dialog(Gtk.Dialog):
 
@@ -283,8 +287,7 @@ class Dialog(Gtk.Dialog):
             raise TypeError('Must pass an even number of arguments')
 
 Dialog = override(Dialog)
-
-__all__ = ['ActionGroup', 'Builder', 'Dialog', 'UIManager']
+__all__.append('Dialog')
 
 import sys
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]