/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-19 22:59:05 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-20060819225905-3e00c8707498c80b
Set sensitivity of menus and toolbuttons.

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

    * olive/frontend/__init__.py: set menu and toolbar sensitivity
    * olive/frontend/handler.py: set context menu sensitivity
    * olive/backend/info.py: implemented is_branch()

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
    except errors.NoRepositoryPresent:
247
247
        pass
248
248
 
 
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
 
249
264
def is_checkout(location):
250
265
    """ Check if the location is a checkout.
251
266
    
275
290
    else:
276
291
        return False
277
292
 
278
 
 
279
293
def log(location, timezone='original', verbose=False, show_ids=False,
280
294
        forward=False, revision=None, log_format=None, message=None,
281
295
        long=False, short=False, line=False):