/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/backend/info.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-10 11:49:24 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060810114924-d1e0acc313c07d2b
Implemented Informations functionality; some bzrlib API changes handled.

2006-08-10  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/backend/info_helper.py: made it 0.9 API compatible
    * olive/backend/info.py: small bug fixed
    * olive/frontend/gtk/info.py: implemented Information window
    * olive.glade: added Informations window
    * Olive is two months old!

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic) <szilveszter.farkas@gmail.com>
2
2
# Some parts of the code are:
3
3
# Copyright (C) 2005, 2006 by Canonical Ltd
4
 
 
 
4
#
5
5
# This program is free software; you can redistribute it and/or modify
6
6
# it under the terms of the GNU General Public License as published by
7
7
# the Free Software Foundation; either version 2 of the License, or
8
8
# (at your option) any later version.
9
 
 
 
9
#
10
10
# This program is distributed in the hope that it will be useful,
11
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
13
# GNU General Public License for more details.
14
 
 
 
14
#
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
160
160
    ret['locking']['workingtree']: Working tree lock status
161
161
    ret['locking']['branch']: Branch lock status
162
162
    ret['locking']['repository']: Repository lock status
163
 
    ret['mrevbranch']['missing']: Missing revisions in branch
164
 
    ret['mrevworking']['missing']: Missing revisions in working tree
 
163
    ret['missing']['branch']: Missing revisions in branch
 
164
    ret['missing']['workingtree']: Missing revisions in working tree
165
165
    ret['wtstats']['unchanged']: Unchanged files
166
166
    ret['wtstats']['modified']: Modified files
167
167
    ret['wtstats']['added']: Added files
183
183
    import info_helper
184
184
    
185
185
    ret = {}
186
 
    a_bzrdir = bzrdir.BzrDir.open_containing(location)[0]
 
186
    try:
 
187
        a_bzrdir = bzrdir.BzrDir.open_containing(location)[0]
 
188
    except errors.NotBranchError:
 
189
        raise NotBranchError(location)
 
190
 
187
191
    try:
188
192
        working = a_bzrdir.open_workingtree()
189
193
        working.lock_read()
191
195
            branch = working.branch
192
196
            repository = branch.repository
193
197
            control = working.bzrdir
194
 
 
 
198
            
195
199
            ret['location'] = info_helper.get_location_info(repository, branch, working)
196
200
            ret['related'] = info_helper.get_related_info(branch)
197
201
            ret['format'] = info_helper.get_format_info(control, repository, branch, working)
198
202
            ret['locking'] = info_helper.get_locking_info(repository, branch, working)
199
 
            ret['mrevbranch'] = info_helper.get_missing_revisions_branch(branch)
200
 
            ret['mrevworking'] = info_helper.get_missing_revisions_working(working)
 
203
            ret['missing'] = {}
 
204
            ret['missing']['branch'] = info_helper.get_missing_revisions_branch(branch)
 
205
            ret['missing']['workingtree'] = info_helper.get_missing_revisions_working(working)
201
206
            ret['wtstats'] = info_helper.get_working_stats(working)
202
207
            ret['brstats'] = info_helper.get_branch_stats(branch)
203
208
            ret['repstats'] = info_helper.get_repository_stats(repository)
216
221
            ret['related'] = info_helper.get_related_info(branch)
217
222
            ret['format'] = info_helper.get_format_info(control, repository, branch)
218
223
            ret['locking'] = info_helper.get_locking_info(repository, branch)
219
 
            ret['mrevbranch'] = info_helper.get_missing_revisions_branch(branch)
 
224
            ret['missing']['branch'] = info_helper.get_missing_revisions_branch(branch)
220
225
            ret['brstats'] = info_helper.get_branch_stats(branch)
221
226
            ret['repstats'] = info_helper.get_repository_stats(repository)
222
227
        finally: