Author: reinhard Date: 2011-02-17 02:05:56 -0600 (Thu, 17 Feb 2011) New Revision: 10293
Modified: trunk/gnue-common/ trunk/gnue-common/src/datasources/GConnections.py trunk/gnue-common/src/datasources/GDataSource.py trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py Log: Merged from savannah Property changes on: trunk/gnue-common ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2011-01-31 12:08:39.948999882 -0800 committer: Whizman Software Solutions <www.whizman.com> properties: branch-nick: common + timestamp: 2011-02-16 18:03:17.683000088 -0800 committer: whizman.com properties: branch-nick: common Name: bzr:file-ids - src/datasources/GConnections.py 1060@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2FGConnections.py + src/datasources/GConnections.py 1060@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2FGConnections.py src/datasources/GDataSource.py 1098@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2FGDataSource.py src/datasources/drivers/Base/ResultSet.py 4887@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2FBase%2FResultSet.py Name: bzr:revision-id:v4 - 3116 reinhard.muel...@bytewise.at-20100426083315-ccfwx2pihuvqn60z 3117 reinhard.muel...@bytewise.at-20100503114756-unpxm52de0towufo 3118 reinhard.muel...@bytewise.at-20100503115129-uvondrz5bvkqubyv 3119 reinhard.muel...@bytewise.at-20100505081835-9peco6k7a2le0mvg 3120 reinhard.muel...@bytewise.at-20100505084742-wn5vtc4a129z8g28 3121 reinhard.muel...@bytewise.at-20100505092131-m2avvsci5w6aj0rv 3122 reinhard.muel...@bytewise.at-20100519151545-pybk8q2s234vzsf2 3123 reinhard.muel...@bytewise.at-20100525101023-xs7k6pkghh9t6fc3 3124 reinhard.muel...@bytewise.at-20100525114015-rj7eb0xdheqkcuql 3125 reinhard.muel...@bytewise.at-20100525145035-j177jbvu10me4mfp 3126 reinhard.muel...@bytewise.at-20100526111738-ic0wot9z1ulg2y1a 3127 reinhard.muel...@bytewise.at-20100612121357-1nf23tuj1tveh1lv 3128 reinhard.muel...@bytewise.at-20100929190642-6pp6cwlicgt2bhhs 3129 reinhard.muel...@bytewise.at-20100929190817-bje4kkvrjrpanut1 3130 reinhard.muel...@bytewise.at-20101016191602-kceb6hdjytt4im93 3131 reinhard.muel...@bytewise.at-20101020175112-o65lqy8lejjrvzaz 3132 reinhard.muel...@bytewise.at-20101020195535-gb2bt2h80mu5j5h4 3133 reinhard.muel...@bytewise.at-20101020203525-nvdwy7b9r84bngco 3134 reinhard.muel...@bytewise.at-20101028150844-49qu2auedxl5b5kv 3135 reinhard.muel...@bytewise.at-20101028152619-p6ytgkke9zw38o7a 3136 reinhard.muel...@bytewise.at-20101102085744-sfxbu24ep3nwxixc 3137 reinhard.muel...@bytewise.at-20101102085857-sgtswbhhj0baf9d7 3138 reinhard.muel...@bytewise.at-20101103071215-929sbj5boj2wcxuu 3139 reinhard.muel...@bytewise.at-20101114130053-ueyx4ilszsilw6hc 3140 reinhard.muel...@bytewise.at-20101114183532-h66yegryl7hcen0f 3141 reinhard.muel...@bytewise.at-20101130142356-cxfqmitx4trkjcja 3142 reinhard.muel...@bytewise.at-20101201235201-z7jjs7xhfmonjcni 3143 reinhard.muel...@bytewise.at-20101202213225-9hj88a0rur552boy 3144 reinhard.muel...@bytewise.at-20101202222236-g81i5zcnxr8l2q7o 3145 reinhard.muel...@bytewise.at-20101202232811-ydwqz1rwr8a17fad 3146 reinhard.muel...@bytewise.at-20101202235915-yhfdb6fvj5znz35y 3147 reinhard.muel...@bytewise.at-20101216212153-y9oprapjl2z2gnh2 3148 reinhard.muel...@bytewise.at-20101216213128-i3zvbyb1mhx6i5jp 3149 reinhard.muel...@bytewise.at-20110128101843-8qa9x9tvae5mrt7g 3150 reinhard.muel...@bytewise.at-20110128105648-3ffqgfxlmh9u80p4 3151 whizman_software_solutions_www.whizman.com-20110131200839-1fm0kcoi0hn3u14c + 3116 reinhard.muel...@bytewise.at-20100426083315-ccfwx2pihuvqn60z 3117 reinhard.muel...@bytewise.at-20100503114756-unpxm52de0towufo 3118 reinhard.muel...@bytewise.at-20100503115129-uvondrz5bvkqubyv 3119 reinhard.muel...@bytewise.at-20100505081835-9peco6k7a2le0mvg 3120 reinhard.muel...@bytewise.at-20100505084742-wn5vtc4a129z8g28 3121 reinhard.muel...@bytewise.at-20100505092131-m2avvsci5w6aj0rv 3122 reinhard.muel...@bytewise.at-20100519151545-pybk8q2s234vzsf2 3123 reinhard.muel...@bytewise.at-20100525101023-xs7k6pkghh9t6fc3 3124 reinhard.muel...@bytewise.at-20100525114015-rj7eb0xdheqkcuql 3125 reinhard.muel...@bytewise.at-20100525145035-j177jbvu10me4mfp 3126 reinhard.muel...@bytewise.at-20100526111738-ic0wot9z1ulg2y1a 3127 reinhard.muel...@bytewise.at-20100612121357-1nf23tuj1tveh1lv 3128 reinhard.muel...@bytewise.at-20100929190642-6pp6cwlicgt2bhhs 3129 reinhard.muel...@bytewise.at-20100929190817-bje4kkvrjrpanut1 3130 reinhard.muel...@bytewise.at-20101016191602-kceb6hdjytt4im93 3131 reinhard.muel...@bytewise.at-20101020175112-o65lqy8lejjrvzaz 3132 reinhard.muel...@bytewise.at-20101020195535-gb2bt2h80mu5j5h4 3133 reinhard.muel...@bytewise.at-20101020203525-nvdwy7b9r84bngco 3134 reinhard.muel...@bytewise.at-20101028150844-49qu2auedxl5b5kv 3135 reinhard.muel...@bytewise.at-20101028152619-p6ytgkke9zw38o7a 3136 reinhard.muel...@bytewise.at-20101102085744-sfxbu24ep3nwxixc 3137 reinhard.muel...@bytewise.at-20101102085857-sgtswbhhj0baf9d7 3138 reinhard.muel...@bytewise.at-20101103071215-929sbj5boj2wcxuu 3139 reinhard.muel...@bytewise.at-20101114130053-ueyx4ilszsilw6hc 3140 reinhard.muel...@bytewise.at-20101114183532-h66yegryl7hcen0f 3141 reinhard.muel...@bytewise.at-20101130142356-cxfqmitx4trkjcja 3142 reinhard.muel...@bytewise.at-20101201235201-z7jjs7xhfmonjcni 3143 reinhard.muel...@bytewise.at-20101202213225-9hj88a0rur552boy 3144 reinhard.muel...@bytewise.at-20101202222236-g81i5zcnxr8l2q7o 3145 reinhard.muel...@bytewise.at-20101202232811-ydwqz1rwr8a17fad 3146 reinhard.muel...@bytewise.at-20101202235915-yhfdb6fvj5znz35y 3147 reinhard.muel...@bytewise.at-20101216212153-y9oprapjl2z2gnh2 3148 reinhard.muel...@bytewise.at-20101216213128-i3zvbyb1mhx6i5jp 3149 reinhard.muel...@bytewise.at-20110128101843-8qa9x9tvae5mrt7g 3150 reinhard.muel...@bytewise.at-20110128105648-3ffqgfxlmh9u80p4 3151 whizman_software_solutions_www.whizman.com-20110131200839-1fm0kcoi0hn3u14c 3152 whizman.com-20110217020317-icwlxpg3y0q9w8g5 Name: bzr:text-parents - src/datasources/GConnections.py reinhard.muel...@bytewise.at-20101216213128-i3zvbyb1mhx6i5jp + src/datasources/GConnections.py whizman_software_solutions_www.whizman.com-20110131200839-1fm0kcoi0hn3u14c reinhard.muel...@bytewise.at-20110214131602-dnu0467zoz10cmzg src/datasources/GDataSource.py reinhard.muel...@bytewise.at-20101202232811-ydwqz1rwr8a17fad src/datasources/drivers/Base/ResultSet.py reinhard.muel...@bytewise.at-20110202145653-2j4pogtko4nou0xp Name: bzr:ancestry:v4 + reinhard.muel...@bytewise.at-20110214131602-dnu0467zoz10cmzg Name: bzr:text-revisions + src/datasources/GDataSource.py reinhard.muel...@bytewise.at-20110202145653-2j4pogtko4nou0xp src/datasources/drivers/Base/ResultSet.py reinhard.muel...@bytewise.at-20110204075500-9g093oy8a3ahqxk3 Name: svn:mergeinfo + /trunk/gnue-common:10283,10286-10287 Name: svk:merge + 3a364389-8fce-0310-8f11-cc363fde16c7:/trunk/gnue-common:10287 Modified: trunk/gnue-common/src/datasources/GConnections.py =================================================================== Modified: trunk/gnue-common/src/datasources/GDataSource.py =================================================================== --- trunk/gnue-common/src/datasources/GDataSource.py 2011-02-17 08:05:51 UTC (rev 10292) +++ trunk/gnue-common/src/datasources/GDataSource.py 2011-02-17 08:05:56 UTC (rev 10293) @@ -825,11 +825,11 @@ if self.__master: self.__master.requeryAll (commit) else: - self.__currentResultSet.requery (commit) - # Many records can have changed through backend triggers. The UI has to - # follow the changes. - self.__eventController.dispatchEvent ('dsResultSetChanged', - resultSet = self.__currentResultSet) + if self.__currentResultSet.requery (commit): + # Many records can have changed through backend triggers. The UI has to + # follow the changes. + self.__eventController.dispatchEvent ('dsResultSetChanged', + resultSet = self.__currentResultSet) # --------------------------------------------------------------------------- Modified: trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2011-02-17 08:05:51 UTC (rev 10292) +++ trunk/gnue-common/src/datasources/drivers/Base/ResultSet.py 2011-02-17 08:05:56 UTC (rev 10293) @@ -296,7 +296,7 @@ depends on the backend. """ - checktype(record, int) + checktype(record, (int, long)) while (record + 1 > len(self.__cached_records)) \ and self.__cache_next_record(): @@ -479,7 +479,7 @@ fetching it from the backend fails. The exact exception class depends on the backend. """ - checktype(record, int) + checktype(record, (int, long)) while (record > len(self.__cached_records) - 1) \ and self.__cache_next_record(): @@ -764,10 +764,13 @@ @param commit: indicate whether a commit was run since the last L{post} call. + @return: True if something has changed at all, False otherwise. + @raise Exception: if querying the records from the backend fails for any reason. The exact exception classes depend on the backend. """ + any_change = False index = 0 while index < len(self.__cached_records): record = self.__cached_records[index] @@ -779,12 +782,16 @@ else: record._requery(commit) index += 1 + any_change = True else: index += 1 - self.__sync(False) + if any_change: + self.__sync(False) + return any_change + # ------------------------------------------------------------------------- # Merge another ResultSet into this one # ------------------------------------------------------------------------- _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue