/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-07 16:51:21 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-20060807165121-10fe27c374bbdffd
Added new artwork.

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

    * olive.galde: added custom artwork (icons)
    * icons/*: new icons for the toolbar
    * setup.py: install the icons

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['missing']['branch']: Missing revisions in branch
164
 
    ret['missing']['workingtree']: Missing revisions in working tree
 
163
    ret['mrevbranch']['missing']: Missing revisions in branch
 
164
    ret['mrevworking']['missing']: 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
 
    try:
187
 
        a_bzrdir = bzrdir.BzrDir.open_containing(location)[0]
188
 
    except errors.NotBranchError:
189
 
        raise NotBranchError(location)
190
 
 
 
186
    a_bzrdir = bzrdir.BzrDir.open_containing(location)[0]
191
187
    try:
192
188
        working = a_bzrdir.open_workingtree()
193
189
        working.lock_read()
195
191
            branch = working.branch
196
192
            repository = branch.repository
197
193
            control = working.bzrdir
198
 
            
 
194
 
199
195
            ret['location'] = info_helper.get_location_info(repository, branch, working)
200
196
            ret['related'] = info_helper.get_related_info(branch)
201
197
            ret['format'] = info_helper.get_format_info(control, repository, branch, working)
202
198
            ret['locking'] = info_helper.get_locking_info(repository, branch, 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)
 
199
            ret['mrevbranch'] = info_helper.get_missing_revisions_branch(branch)
 
200
            ret['mrevworking'] = info_helper.get_missing_revisions_working(working)
206
201
            ret['wtstats'] = info_helper.get_working_stats(working)
207
202
            ret['brstats'] = info_helper.get_branch_stats(branch)
208
203
            ret['repstats'] = info_helper.get_repository_stats(repository)
221
216
            ret['related'] = info_helper.get_related_info(branch)
222
217
            ret['format'] = info_helper.get_format_info(control, repository, branch)
223
218
            ret['locking'] = info_helper.get_locking_info(repository, branch)
224
 
            ret['missing']['branch'] = info_helper.get_missing_revisions_branch(branch)
 
219
            ret['mrevbranch'] = info_helper.get_missing_revisions_branch(branch)
225
220
            ret['brstats'] = info_helper.get_branch_stats(branch)
226
221
            ret['repstats'] = info_helper.get_repository_stats(repository)
227
222
        finally:
246
241
    except errors.NoRepositoryPresent:
247
242
        pass
248
243
 
249
 
def is_branch(location):
250
 
    """ Check if the location is a branch.
251
 
    
252
 
    :param location: the location you want to check
253
 
    
254
 
    :return: True or False respectively
255
 
    """
256
 
    try:
257
 
        branch = Branch.open_containing(location)[0]
258
 
    except errors.NotBranchError:
259
 
        return False
260
 
    else:
261
 
        return True
262
 
        
263
 
 
264
244
def is_checkout(location):
265
245
    """ Check if the location is a checkout.
266
246
    
290
270
    else:
291
271
        return False
292
272
 
 
273
 
293
274
def log(location, timezone='original', verbose=False, show_ids=False,
294
275
        forward=False, revision=None, log_format=None, message=None,
295
276
        long=False, short=False, line=False):