/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/info_helper.py

  • Committer: rodney.dawes at canonical
  • Date: 2008-10-25 06:02:09 UTC
  • Revision ID: rodney.dawes@canonical.com-20081025060209-irlizouino63cs1m
        * preferences/__init__.py:
        Remove the dialog separator
        Remove useless extra call to self._create_pages()
        Make the default window size smaller
        Set the default border width on various widgets
        Set the current notebook page to the first one

        * preferences/identity.py:
        Set various border widths appropriately
        Align the labels to the left
        Remove the unneeded bold markup from the labels
        Change the "User Id" label to "E-Mail"
        Align the radio group labels to the top of the groups

        * preferences/plugins.py:
        Set various border widths appropriately
        Set the default paned position to something more sensible
        Set the shadow type on the treeview's scrolled window to in
        Align the Author and Version labels to the left

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
19
import time
 
20
import sys
20
21
 
21
22
import bzrlib
22
23
 
28
29
    urlutils,
29
30
    )
30
31
 
 
32
from bzrlib.diff import show_diff_trees
31
33
from bzrlib.missing import find_unmerged
32
 
 
 
34
    
33
35
def _repo_rel_url(repo_url, inner_url):
34
36
    """Return path with common prefix of repository path removed.
35
37
 
260
262
    if revno > 0:
261
263
        firstrev = repository.get_revision(history[0])
262
264
        age = int((time.time() - firstrev.timestamp) / 3600 / 24)
263
 
        ret['age'] = age
 
265
        ret['age'] = '%d days'%age
264
266
        ret['firstrev'] = osutils.format_date(firstrev.timestamp,
265
267
                                              firstrev.timezone)
266
268
 
279
281
    if repository.bzrdir.root_transport.listable():
280
282
        c, t = repository._revision_store.total_size(repository.get_transaction())
281
283
        ret['revisions'] = c
282
 
        ret['size'] = t
 
284
        ret['size'] = '%d KiB'%t
283
285
 
284
286
    return ret
285
287
 
298
300
 
299
301
    :param new_revision_spec:  if None, use working tree as new revision, otherwise use the tree for the specified revision.
300
302
    """
301
 
    import sys
302
 
    
303
 
    from bzrlib.diff import show_diff_trees
304
303
    
305
304
    if output == None:
306
305
        output = sys.stdout
307
306
    
308
 
    def spec_tree(spec):
309
 
        revision_id = spec.in_store(tree.branch).rev_id
310
 
        return tree.branch.repository.revision_tree(revision_id)
311
 
    
312
307
    if old_revision_spec is None:
313
308
        old_tree = tree.basis_tree()
314
309
    else:
322
317
    return show_diff_trees(old_tree, new_tree, output, specific_files,
323
318
                           external_diff_options,
324
319
                           old_label=old_label, new_label=new_label)
 
320
 
 
321
def spec_tree(spec):
 
322
        revision_id = spec.in_store(tree.branch).rev_id
 
323
        return tree.branch.repository.revision_tree(revision_id)