diff -Nru bzr-gtk-0.95.0/bzr-notify /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/bzr-notify --- bzr-gtk-0.95.0/bzr-notify 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/bzr-notify 2008-11-07 17:01:12.000000000 +0000 @@ -16,6 +16,7 @@ menu = NotifyPopupMenu() icon = gtk.status_icon_new_from_file(icon_path("bzr-icon-64.png")) icon.connect('popup-menu', menu.display) +icon.set_visible(False) import cgi import dbus @@ -30,6 +31,9 @@ BROADCAST_INTERFACE = "org.bazaarvcs.plugins.dbus.Broadcast" bus = dbus.SessionBus() +def hide_icon(): + icon.set_visible(False) + def catch_branch(revision_id, urls): # TODO: show all the urls, or perhaps choose the 'best'. url = urls[0] @@ -60,6 +64,8 @@ bd.run() nw.add_action("inspect", "Inspect", start_viz, None) nw.add_action("branch", "Branch", start_branch, None) + icon.set_visible(True) + gobject.timeout_add(5000, hide_icon) nw.set_timeout(5000) nw.show() except Exception, e: diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/commit.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/commit.py --- bzr-gtk-0.95.0/commit.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/commit.py 2008-11-07 17:01:12.000000000 +0000 @@ -101,10 +101,12 @@ """Implementation of Commit.""" def __init__(self, wt, selected=None, parent=None): - gtk.Dialog.__init__(self, title="Commit", + gtk.Dialog.__init__(self, title="Commit to %s" % wt.basedir, parent=parent, flags=0, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) + buttons=(gtk.STOCK_CANCEL, + gtk.RESPONSE_CANCEL)) + self._question_dialog = question_dialog self._wt = wt # TODO: Do something with this value, it is used by Olive @@ -650,7 +652,7 @@ message = self._get_global_commit_message() if message == '': - response = question_dialog( + response = self._question_dialog( _i18n('Commit with an empty message?'), _i18n('You can describe your commit intent in the message.'), parent=self) @@ -671,7 +673,7 @@ # entirely, since there isn't a way for them to add the unknown # files at this point. for path in self._wt.unknowns(): - response = question_dialog( + response = self._question_dialog( _i18n("Commit with unknowns?"), _i18n("Unknown files exist in the working tree. Commit anyway?"), parent=self) @@ -692,7 +694,7 @@ specific_files=specific_files, revprops=revprops) except errors.PointlessCommit: - response = question_dialog( + response = self._question_dialog( _i18n('Commit with no changes?'), _i18n('There are no changes in the working tree.' ' Do you want to commit anyway?'), diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/create-credits.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/create-credits.py --- bzr-gtk-0.95.0/create-credits.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/create-credits.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,26 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2008 Jelmer Vernooij -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -from bzrlib.branch import Branch -from bzrlib.plugins.stats import find_credits - -import pickle - -branch = Branch.open(".") -credits = find_credits(branch.repository, branch.last_revision()) - -pickle.dump(credits, file("credits.pickle", 'w')) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/credits.pickle /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/credits.pickle --- bzr-gtk-0.95.0/credits.pickle 2008-08-04 19:09:13.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/credits.pickle 2009-02-02 13:24:10.000000000 +0000 @@ -31,19 +31,19 @@ p15 aS'Robert Collins ' p16 -aS'Szilveszter Farkas (Phanatic) ' +aS'Vincent Ladeuil ' p17 -aS'Martin Albisetti ' +aS'Szilveszter Farkas (Phanatic) ' p18 -aS'Sabin Iacob (m0n5t3r) ' +aS'Martin Albisetti ' p19 -aS'Javier Derderian ' +aS'Sabin Iacob (m0n5t3r) ' p20 -aS'jbailey@ubuntu.com' +aS'Javier Derderian ' p21 -aS'Gary van der Merwe ' +aS'jbailey@ubuntu.com' p22 -aS'Vincent Ladeuil ' +aS'Gary van der Merwe ' p23 aS'Richard Ferguson ' p24 @@ -57,118 +57,122 @@ p28 aS'Jamie Wilkinson ' p29 -aS'Ali Sabil ' +aS'Gediminas Paulauskas ' p30 -aS'Adrian Wilkins ' +aS'Ali Sabil ' p31 -aS'Michael Ellerman ' +aS'Adrian Wilkins ' p32 -aS'Jelmer Vernooij ' +aS'Michael Ellerman ' p33 -aS'Farkas Szilveszter ' +aS'Mateusz Korniak (matkor@laptop-hp)' p34 -aVDaniel Schömer +aS'Jelmer Vernooij ' p35 -aS'Chris Lamb ' +aS'Farkas Szilveszter ' p36 -aS'Chad MILLER ' +aVDaniel Schömer p37 -aS'matkor ' +aS'Chris Lamb ' p38 -aS'klight@walkertechnical.com' +aS'Chad MILLER ' p39 -aS'klight ' +aS'rodney.dawes@canonical.com' p40 -aS'Vincent Geddes ' +aS'matkor ' p41 -aS'Tom Badran ' +aS'klight@walkertechnical.com' p42 -aS'Szilveszter Farkas ' +aS'klight ' p43 -aVStéphane Raimbault +aS'Vincent Geddes ' p44 -aS'Scott James Remnant ' +aS'Tom Badran ' p45 -aS'Russ Brown ' +aS'Szilveszter Farkas ' p46 -aS'Richard Ferguson ' +aVStéphane Raimbault p47 -aS'Mateusz Korniak (matkor@laptop-hp)' +aS'Scott James Remnant ' p48 -aS'Kevin Light ' +aS'Russ Brown ' p49 -aVJean-François Fortin Tam +aS'Richard Ferguson ' p50 -aS'Jasper Groenewegen ' +aS'Kevin Light ' p51 -aS'James Westby ' +aVJean-François Fortin Tam p52 -aS'James Henstridge ' +aS'Jasper Groenewegen ' p53 -aS'Erik Bagfors ' +aS'James Westby ' p54 -aS'Dennis Miller ' +aS'James Henstridge ' p55 -aS'Andrew Bennetts ' +aS'Erik Bagfors ' p56 -a(lp57 -S'Jelmer Vernooij ' +aS'Dennis Miller ' +p57 +aS'Andrew Bennetts ' p58 +a(lp59 +S'Jelmer Vernooij ' +p60 aS'Szilveszter Farkas (Phanatic) ' -p59 +p61 aS'Daniel Schierbeck ' -p60 +p62 ag11 aS'Gary van der Merwe ' -p61 +p63 aVAdeodato Simó -p62 +p64 aS'Szilveszter Farkas ' -p63 +p65 aS'Scott Scriven ' -p64 +p66 ag13 -ag38 +ag41 aS'jbailey@ubuntu.com' -p65 +p67 aS'Vincent Ladeuil ' -p66 +p68 aS'Tom Badran ' -p67 -ag45 +p69 +ag48 aS'Russ Brown ' -p68 +p70 aS'Robert Collins ' -p69 +p71 aS'Mateusz Korniak ' -p70 +p72 aS'Martin Albisetti ' -p71 +p73 aS'Kiddo ' -p72 -ag49 +p74 +ag51 aS'Jelmer Vernooij ' -p73 -ag52 -ag22 +p75 +ag54 +ag23 aS'David Allouche ' -p74 +p76 aS'Aaron Bentley ' -p75 -a(lp76 -S'Szilveszter Farkas (Phanatic) ' p77 +a(lp78 +S'Szilveszter Farkas (Phanatic) ' +p79 aS'Daniel Schierbeck ' -p78 +p80 aS'Martin Albisetti ' -p79 +p81 aS'Jelmer Vernooij ' -p80 -a(lp81 -S'Szilveszter Farkas (Phanatic) ' p82 +a(lp83 +S'Szilveszter Farkas (Phanatic) ' +p84 aS'Szilveszter Farkas (Phanatic) ' -p83 -ag44 -atp84 +p85 +ag47 +atp86 . \ No newline at end of file diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/debian/bzr-gtk.lintian-overrides /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/debian/bzr-gtk.lintian-overrides --- bzr-gtk-0.95.0/debian/bzr-gtk.lintian-overrides 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/debian/bzr-gtk.lintian-overrides 2009-02-02 13:24:10.000000000 +0000 @@ -1,3 +1,2 @@ # These .desktop files start via "/usr/bin/bzr" bzr-gtk: desktop-command-not-in-package /usr/share/applications/bazaar-properties.desktop bzr -bzr-gtk: desktop-command-not-in-package /usr/share/applications/bzr-handle-patch.desktop bzr diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/debian/changelog /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/debian/changelog --- bzr-gtk-0.95.0/debian/changelog 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/debian/changelog 2009-02-02 13:24:10.000000000 +0000 @@ -1,52 +1,30 @@ -bzr-gtk (0.95.0-1ubuntu6) intrepid; urgency=low +bzr-gtk (0.95.0+bzr622-1ubuntu1~ppa1) intrepid; urgency=low - * Add Depends: python-notify, as this is used by the bzr-notify script. - Thanks Ralph Janke (LP: #281901) + * Backport from Debian Experimental - -- James Westby Mon, 20 Oct 2008 16:14:54 +0100 + -- Jerome Soyer Mon, 02 Feb 2009 14:12:16 +0100 -bzr-gtk (0.95.0-1ubuntu5) intrepid; urgency=low +bzr-gtk (0.95.0+bzr622-1) experimental; urgency=low - * Install the credits file so that the about window doesn't crash. - Thanks Jelmer. (LP: #271636) + * Add build dependency on python-nautilus. + * Depend on newer version of python-nautilus, with changed API. + (Closes: #501597) - -- James Westby Wed, 15 Oct 2008 22:39:46 +0100 + -- Jelmer Vernooij Fri, 07 Nov 2008 17:51:49 +0100 -bzr-gtk (0.95.0-1ubuntu4) intrepid; urgency=low +bzr-gtk (0.95.0+bzr621-1) experimental; urgency=low - * bzr-handle-patch.desktop: Exec bzr-handle-patch instead of "bzr - ghandle-patch", as again the latter is removed. - - Also change the icon to one that is shipped in the package. - * bzr-notify.desktop: Remove .png from the icon name as it should not be - present. (LP: #268717) + * New upstream snapshot + * Use olive-gtk.1 included with upstream. + * Suggest bzr-loom, since there now is a loom frontend. - -- James Westby Thu, 09 Oct 2008 17:03:15 +0100 + -- Jelmer Vernooij Fri, 07 Nov 2008 16:45:21 +0100 -bzr-gtk (0.95.0-1ubuntu3) intrepid; urgency=low +bzr-gtk (0.95.0+bzr611-1) experimental; urgency=low - * Change bzr-notify.desktop to use "bzr-notify" rather than "bzr - commit-notify" as the latter is removed, replaced by the former. - (LP: #132191) + * Package new upstream snapshot. - -- James Westby Thu, 09 Oct 2008 16:35:55 +0100 - -bzr-gtk (0.95.0-1ubuntu2) intrepid; urgency=low - - * bazaar-properties.desktop: Inline change to point to the - correct icon (LP: #150760) - - -- David Futcher Tue, 26 Aug 2008 23:00:57 +0100 - -bzr-gtk (0.95.0-1ubuntu1) intrepid; urgency=low - - * Merge from Debian (LP: #261645), remaining changes: - - Fix name, add french translation and remove some deprecated keys in - olive-gtk.desktop (LP: #245633) - - Forwarded upstream. - * Above change is now applied inline, as Debian no longer has a patch - system. - - -- James Westby Tue, 26 Aug 2008 23:00:57 +0100 + -- Jelmer Vernooij Tue, 14 Oct 2008 20:47:53 +0200 bzr-gtk (0.95.0-1) experimental; urgency=low @@ -55,13 +33,6 @@ -- Jelmer Vernooij Mon, 04 Aug 2008 20:47:29 +0200 -bzr-gtk (0.94.0-1ubuntu1) intrepid; urgency=low - - * add 04-change-menu-entry.dpatch to fix name, add french translation and - remove some deprecated keys in olive-gtk.desktop (LP: #245633) - - -- Didier Roche Fri, 01 Aug 2008 15:14:06 +0200 - bzr-gtk (0.94.0-1) unstable; urgency=low [ Jelmer Vernooij ] diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/debian/control /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/debian/control --- bzr-gtk-0.95.0/debian/control 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/debian/control 2009-02-02 13:24:10.000000000 +0000 @@ -1,11 +1,10 @@ Source: bzr-gtk Section: python Priority: optional -Maintainer: Ubuntu MOTU Developers -XSBC-Original-Maintainer: Debian Bazaar Maintainers -Uploaders: Chris Lamb , Jelmer Vernooij , Adeodato Simó +Maintainer: Debian Bazaar Maintainers +Uploaders: Chris Lamb , Jelmer Vernooij Build-Depends-Indep: bzr (>= 1.6~) -Build-Depends: python-central (>= 0.5), cdbs (>= 0.4.43), dpatch, python, debhelper (>= 5.0.37.2) +Build-Depends: python-central (>= 0.5), cdbs (>= 0.4.43), python, debhelper (>= 5.0.37.2), bzr-stats, python-nautilus (>= 0.5.0) Standards-Version: 3.8.0 Homepage: http://bazaar-vcs.org/bzr-gtk XS-Python-Version: >= 2.4 @@ -14,8 +13,9 @@ Package: bzr-gtk Architecture: all -Depends: bzr (>= 1.6~), python-gtk2 (>= 2.8), python-glade2 (>= 2.10), python-notify, ${python:Depends} -Recommends: python-cairo (>= 1.0), bzr-dbus, seahorse, bzr-avahi, bzr-search, python-nautilus, python-gnome2-desktop +Depends: bzr (>= 1.6~), python-gtk2 (>= 2.8), python-glade2 (>= 2.10), ${python:Depends} +Recommends: python-cairo (>= 1.0), bzr-dbus, seahorse, python-nautilus (>= 0.5.0), python-gnome2-desktop +Suggests: bzr-loom, bzr-search, bzr-avahi Enhances: bzr, nautilus XB-Python-Version: ${python:Versions} Description: provides graphical interfaces to Bazaar (bzr) version control diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/debian/man/olive-gtk.1 /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/debian/man/olive-gtk.1 --- bzr-gtk-0.95.0/debian/man/olive-gtk.1 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/debian/man/olive-gtk.1 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -.TH OLIVE-GTK 1 "April 24, 2007" -.SH NAME -olive-gtk \- GTK+ frontend for Bazaar -.SH SYNOPSIS -.B olive-gtk -.SH DESCRIPTION -Olive aims to be a full-featured graphical frontend for the Bazaar (bzr) -source code management tool. -.SH SEE ALSO -.BR bzr (1). -.SH AUTHOR -\fBolive-gtk\fP was written by Szilveszter Farkas -.PP -This manual page was written by Chris Lamb , -for the Debian project (but may be used by others). diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/debian/manpages /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/debian/manpages --- bzr-gtk-0.95.0/debian/manpages 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/debian/manpages 2009-02-02 13:24:10.000000000 +0000 @@ -1 +1 @@ -debian/man/* +olive-gtk.1 diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/debian/rules /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/debian/rules --- bzr-gtk-0.95.0/debian/rules 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/debian/rules 2009-02-02 13:24:10.000000000 +0000 @@ -9,6 +9,3 @@ install -m644 -D debian/bzr-gtk.lintian-overrides $(DEB_DESTDIR)/usr/share/lintian/overrides/bzr-gtk install -d $(DEB_DESTDIR)/etc/xdg/autostart install -m644 -D bzr-notify.desktop $(DEB_DESTDIR)/etc/xdg/autostart - -binary-install/bzr-gtk:: - rm -rfv $(DEB_DESTDIR)/usr/lib diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/diff.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/diff.py --- bzr-gtk-0.95.0/diff.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/diff.py 2008-11-07 17:01:12.000000000 +0000 @@ -1,11 +1,10 @@ -# -*- coding: UTF-8 -*- """Difference window. This module contains the code to manage the diff window which shows the changes made between two revisions on a branch. """ -__copyright__ = "Copyright © 2005 Canonical Ltd." +__copyright__ = "Copyright 2005 Canonical Ltd." __author__ = "Scott James Remnant " @@ -635,6 +634,7 @@ renamed_and_modified = 'renamed and modified' modified = 'modified' kind_changed = 'kind changed' + missing = 'missing' # TODO: Handle metadata changes @@ -655,9 +655,15 @@ source_marker = '' else: source_marker = osutils.kind_marker(kinds[0]) + if kinds[1] is None: - assert kinds[0] is not None - marker = osutils.kind_marker(kinds[0]) + if kinds[0] is None: + # We assume bzr will flag only files in that case, + # there may be a bzr bug there as only files seems to + # not receive any kind. + marker = osutils.kind_marker('file') + else: + marker = osutils.kind_marker(kinds[0]) else: marker = osutils.kind_marker(kinds[1]) @@ -665,17 +671,20 @@ if real_path is None: real_path = paths[0] assert real_path is not None - display_path = real_path + marker present_source = versioned[0] and kinds[0] is not None present_target = versioned[1] and kinds[1] is not None - if present_source != present_target: + if kinds[0] is None and kinds[1] is None: + change_type = missing + display_path = real_path + marker + elif present_source != present_target: if present_target: change_type = added else: assert present_source change_type = removed + display_path = real_path + marker elif names[0] != names[1] or parent_ids[0] != parent_ids[1]: # Renamed if changed_content or executables[0] != executables[1]: @@ -689,8 +698,9 @@ change_type = kind_changed display_path = (paths[0] + source_marker + ' => ' + paths[1] + marker) - elif changed_content is True or executables[0] != executables[1]: + elif changed_content or executables[0] != executables[1]: change_type = modified + display_path = real_path + marker else: assert False, "How did we get here?" diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/__init__.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/__init__.py --- bzr-gtk-0.95.0/__init__.py 2008-08-04 19:43:35.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/__init__.py 2008-11-07 17:01:12.000000000 +0000 @@ -22,6 +22,7 @@ gconflicts GTK+ conflicts. gdiff Show differences in working tree in a GTK+ Window. ginit Initialise a new branch. +ginfo GTK+ branch info dialog gloom GTK+ loom browse dialog gmerge GTK+ merge dialog gmissing GTK+ missing revisions dialog. @@ -37,7 +38,7 @@ import bzrlib -version_info = (0, 95, 0, 'final', 1) +version_info = (0, 96, 0, 'dev', 1) if version_info[3] == 'final': version_string = '%d.%d.%d' % version_info[:3] @@ -401,7 +402,7 @@ Graphical user interface for showing status information.""" - + aliases = [ "gst" ] takes_args = ['PATH?'] takes_options = ['revision'] @@ -409,21 +410,23 @@ def run(self, path='.', revision=None): import os gtk = open_display() - from status import StatusDialog + from bzrlib.plugins.gtk.status import StatusWindow (wt, wt_path) = workingtree.WorkingTree.open_containing(path) - + if revision is not None: try: revision_id = revision[0].as_revision_id(wt.branch) except: from bzrlib.errors import BzrError - raise BzrError('Revision %r doesn\'t exist' % revision[0].user_spec ) + raise BzrError('Revision %r doesn\'t exist' + % revision[0].user_spec ) else: revision_id = None - status = StatusDialog(wt, wt_path, revision_id) + status = StatusWindow(wt, wt_path, revision_id) status.connect("destroy", gtk.main_quit) - status.run() + status.show() + gtk.main() class cmd_gsend(GTKCommand): @@ -471,6 +474,19 @@ dialog.run() +class cmd_ginfo(Command): + """ GTK+ info dialog + + """ + def run(self): + from bzrlib import workingtree + from bzrlib.plugins.gtk.olive.info import InfoDialog + wt = workingtree.WorkingTree.open_containing('.')[0] + info = InfoDialog(wt.branch) + info.display() + info.window.run() + + class cmd_gmerge(Command): """ GTK+ merge dialog @@ -557,6 +573,7 @@ cmd_gconflicts, cmd_gdiff, cmd_ginit, + cmd_ginfo, cmd_gmerge, cmd_gmissing, cmd_gpreferences, @@ -612,69 +629,6 @@ register_command(cmd_gselftest) -class cmd_test_gtk(GTKCommand): - """Version of selftest that just runs the gtk test suite.""" - - takes_options = ['verbose', - Option('one', short_name='1', - help='Stop when one test fails.'), - Option('benchmark', help='Run the benchmarks.'), - Option('lsprof-timed', - help='Generate lsprof output for benchmarked' - ' sections of code.'), - Option('list-only', - help='List the tests instead of running them.'), - Option('randomize', type=str, argname="SEED", - help='Randomize the order of tests using the given' - ' seed or "now" for the current time.'), - ] - takes_args = ['testspecs*'] - - def run(self, verbose=None, one=False, benchmark=None, - lsprof_timed=None, list_only=False, randomize=None, - testspecs_list=None): - from bzrlib import __path__ as bzrlib_path - from bzrlib.tests import selftest - - print '%10s: %s' % ('bzrlib', bzrlib_path[0]) - if benchmark: - print 'No benchmarks yet' - return 3 - - test_suite_factory = bench_suite - if verbose is None: - verbose = True - # TODO: should possibly lock the history file... - benchfile = open(".perf_history", "at", buffering=1) - else: - test_suite_factory = test_suite - if verbose is None: - verbose = False - benchfile = None - - if testspecs_list is not None: - pattern = '|'.join(testspecs_list) - else: - pattern = ".*" - - try: - result = selftest(verbose=verbose, - pattern=pattern, - stop_on_failure=one, - test_suite_factory=test_suite_factory, - lsprof_timed=lsprof_timed, - bench_history=benchfile, - list_only=list_only, - random_seed=randomize, - ) - finally: - if benchfile is not None: - benchfile.close() - -register_command(cmd_test_gtk) - - - import gettext gettext.install('olive-gtk') diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/__init__.py~ /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/__init__.py~ --- bzr-gtk-0.95.0/__init__.py~ 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/__init__.py~ 1970-01-01 01:00:00.000000000 +0100 @@ -1,708 +0,0 @@ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -"""Graphical support for Bazaar using GTK. - -This plugin includes: -gannotate GTK+ annotate. -gbranch GTK+ branching. -gcheckout GTK+ checkout. -gcommit GTK+ commit dialog. -gconflicts GTK+ conflicts. -gdiff Show differences in working tree in a GTK+ Window. -ginit Initialise a new branch. -gloom GTK+ loom browse dialog -gmerge GTK+ merge dialog -gmissing GTK+ missing revisions dialog. -gpreferences GTK+ preferences dialog. -gpush GTK+ push. -gsend GTK+ send merge directive. -gstatus GTK+ status dialog. -gtags Manage branch tags. -visualise Graphically visualise this branch. -""" - -import sys - -import bzrlib - -version_info = (0, 95, 0, 'final', 1) - -if version_info[3] == 'final': - version_string = '%d.%d.%d' % version_info[:3] -else: - version_string = '%d.%d.%d%s%d' % version_info -__version__ = version_string - -required_bzrlib = (1, 3) - -def check_bzrlib_version(desired): - """Check that bzrlib is compatible. - - If version is < bzr-gtk version, assume incompatible. - """ - bzrlib_version = bzrlib.version_info[:2] - try: - from bzrlib.trace import warning - except ImportError: - # get the message out any way we can - from warnings import warn as warning - if bzrlib_version < desired: - from bzrlib.errors import BzrError - warning('Installed Bazaar version %s is too old to be used with bzr-gtk' - ' %s.' % (bzrlib.__version__, __version__)) - raise BzrError('Version mismatch: %r, %r' % (version_info, bzrlib.version_info) ) - - -if version_info[2] == "final": - check_bzrlib_version(required_bzrlib) - -from bzrlib.trace import warning -if __name__ != 'bzrlib.plugins.gtk': - warning("Not running as bzrlib.plugins.gtk, things may break.") - -from bzrlib.lazy_import import lazy_import -lazy_import(globals(), """ -from bzrlib import ( - branch, - builtins, - errors, - merge_directive, - workingtree, - ) -""") - -from bzrlib.commands import Command, register_command, display_command -from bzrlib.errors import NotVersionedError, BzrCommandError, NoSuchFile -from bzrlib.option import Option - -import os.path - -def import_pygtk(): - try: - import pygtk - except ImportError: - raise errors.BzrCommandError("PyGTK not installed.") - pygtk.require('2.0') - return pygtk - - -def set_ui_factory(): - import_pygtk() - from ui import GtkUIFactory - import bzrlib.ui - bzrlib.ui.ui_factory = GtkUIFactory() - - -def data_basedirs(): - return [os.path.dirname(__file__), - "/usr/share/bzr-gtk", - "/usr/local/share/bzr-gtk"] - - -def data_path(*args): - for basedir in data_basedirs(): - path = os.path.join(basedir, *args) - if os.path.exists(path): - return path - return None - - -def icon_path(*args): - return data_path(os.path.join('icons', *args)) - - -def open_display(): - pygtk = import_pygtk() - try: - import gtk - except RuntimeError, e: - if str(e) == "could not open display": - raise NoDisplayError - set_ui_factory() - return gtk - - -class GTKCommand(Command): - """Abstract class providing GTK specific run commands.""" - - def run(self): - open_display() - dialog = self.get_gtk_dialog(os.path.abspath('.')) - dialog.run() - - -class cmd_gbranch(GTKCommand): - """GTK+ branching. - - """ - - def get_gtk_dialog(self, path): - from bzrlib.plugins.gtk.branch import BranchDialog - return BranchDialog(path) - - -class cmd_gcheckout(GTKCommand): - """ GTK+ checkout. - - """ - - def get_gtk_dialog(self, path): - from bzrlib.plugins.gtk.checkout import CheckoutDialog - return CheckoutDialog(path) - - - -class cmd_gpush(GTKCommand): - """ GTK+ push. - - """ - takes_args = [ "location?" ] - - def run(self, location="."): - (br, path) = branch.Branch.open_containing(location) - open_display() - from bzrlib.plugins.gtk.push import PushDialog - dialog = PushDialog(br.repository, br.last_revision(), br) - dialog.run() - - -class cmd_gloom(GTKCommand): - """ GTK+ loom. - - """ - takes_args = [ "location?" ] - - def run(self, location="."): - try: - (tree, path) = workingtree.WorkingTree.open_containing(location) - br = tree.branch - except NoWorkingTree, e: - (br, path) = branch.Branch.open_containing(location) - tree = None - open_display() - from bzrlib.plugins.gtk.loom import LoomDialog - dialog = LoomDialog(br, tree) - dialog.run() - - -class cmd_gdiff(GTKCommand): - """Show differences in working tree in a GTK+ Window. - - Otherwise, all changes for the tree are listed. - """ - takes_args = ['filename?'] - takes_options = ['revision'] - - @display_command - def run(self, revision=None, filename=None): - set_ui_factory() - wt = workingtree.WorkingTree.open_containing(".")[0] - wt.lock_read() - try: - branch = wt.branch - if revision is not None: - if len(revision) == 1: - tree1 = wt - revision_id = revision[0].as_revision_id(tree1.branch) - tree2 = branch.repository.revision_tree(revision_id) - elif len(revision) == 2: - revision_id_0 = revision[0].as_revision_id(branch) - tree2 = branch.repository.revision_tree(revision_id_0) - revision_id_1 = revision[1].as_revision_id(branch) - tree1 = branch.repository.revision_tree(revision_id_1) - else: - tree1 = wt - tree2 = tree1.basis_tree() - - from diff import DiffWindow - import gtk - window = DiffWindow() - window.connect("destroy", gtk.main_quit) - window.set_diff("Working Tree", tree1, tree2) - if filename is not None: - tree_filename = wt.relpath(filename) - try: - window.set_file(tree_filename) - except NoSuchFile: - if (tree1.path2id(tree_filename) is None and - tree2.path2id(tree_filename) is None): - raise NotVersionedError(filename) - raise BzrCommandError('No changes found for file "%s"' % - filename) - window.show() - - gtk.main() - finally: - wt.unlock() - - -def start_viz_window(branch, revisions, limit=None): - """Start viz on branch with revision revision. - - :return: The viz window object. - """ - from bzrlib.plugins.gtk.viz import BranchWindow - return BranchWindow(branch, revisions, limit) - - -class cmd_visualise(Command): - """Graphically visualise this branch. - - Opens a graphical window to allow you to see the history of the branch - and relationships between revisions in a visual manner, - - The default starting point is latest revision on the branch, you can - specify a starting point with -r revision. - """ - takes_options = [ - "revision", - Option('limit', "Maximum number of revisions to display.", - int, 'count')] - takes_args = [ "locations*" ] - aliases = [ "visualize", "vis", "viz" ] - - def run(self, locations_list, revision=None, limit=None): - set_ui_factory() - if locations_list is None: - locations_list = ["."] - revids = [] - for location in locations_list: - (br, path) = branch.Branch.open_containing(location) - if revision is None: - revids.append(br.last_revision()) - else: - revids.append(revision[0].as_revision_id(br)) - import gtk - pp = start_viz_window(br, revids, limit) - pp.connect("destroy", lambda w: gtk.main_quit()) - pp.show() - gtk.main() - - -class cmd_gannotate(GTKCommand): - """GTK+ annotate. - - Browse changes to FILENAME line by line in a GTK+ window. - """ - - takes_args = ["filename", "line?"] - takes_options = [ - Option("all", help="Show annotations on all lines."), - Option("plain", help="Don't highlight annotation lines."), - Option("line", type=int, argname="lineno", - help="Jump to specified line number."), - "revision", - ] - aliases = ["gblame", "gpraise"] - - def run(self, filename, all=False, plain=False, line='1', revision=None): - gtk = open_display() - - try: - line = int(line) - except ValueError: - raise BzrCommandError('Line argument ("%s") is not a number.' % - line) - - from annotate.gannotate import GAnnotateWindow - from annotate.config import GAnnotateConfig - from bzrlib.bzrdir import BzrDir - - wt, br, path = BzrDir.open_containing_tree_or_branch(filename) - if wt is not None: - tree = wt - else: - tree = br.basis_tree() - - file_id = tree.path2id(path) - - if file_id is None: - raise NotVersionedError(filename) - if revision is not None: - if len(revision) != 1: - raise BzrCommandError("Only 1 revion may be specified.") - revision_id = revision[0].as_revision_id(br) - tree = br.repository.revision_tree(revision_id) - else: - revision_id = getattr(tree, 'get_revision_id', lambda: None)() - - window = GAnnotateWindow(all, plain, branch=br) - window.connect("destroy", lambda w: gtk.main_quit()) - config = GAnnotateConfig(window) - window.show() - br.lock_read() - if wt is not None: - wt.lock_read() - try: - window.annotate(tree, br, file_id) - window.jump_to_line(line) - gtk.main() - finally: - br.unlock() - if wt is not None: - wt.unlock() - - - -class cmd_gcommit(GTKCommand): - """GTK+ commit dialog - - Graphical user interface for committing revisions""" - - aliases = [ "gci" ] - takes_args = [] - takes_options = [] - - def run(self, filename=None): - import os - open_display() - from commit import CommitDialog - from bzrlib.errors import (BzrCommandError, - NotBranchError, - NoWorkingTree) - - wt = None - br = None - try: - (wt, path) = workingtree.WorkingTree.open_containing(filename) - br = wt.branch - except NoWorkingTree, e: - from dialog import error_dialog - error_dialog(_i18n('Directory does not have a working tree'), - _i18n('Operation aborted.')) - return 1 # should this be retval=3? - - # It is a good habit to keep things locked for the duration, but it - # could cause difficulties if someone wants to do things in another - # window... We could lock_read() until we actually go to commit - # changes... Just a thought. - wt.lock_write() - try: - dlg = CommitDialog(wt) - return dlg.run() - finally: - wt.unlock() - - -class cmd_gstatus(GTKCommand): - """GTK+ status dialog - - Graphical user interface for showing status - information.""" - - aliases = [ "gst" ] - takes_args = ['PATH?'] - takes_options = ['revision'] - - def run(self, path='.', revision=None): - import os - gtk = open_display() - from status import StatusDialog - (wt, wt_path) = workingtree.WorkingTree.open_containing(path) - - if revision is not None: - try: - revision_id = revision[0].as_revision_id(wt.branch) - except: - from bzrlib.errors import BzrError - raise BzrError('Revision %r doesn\'t exist' % revision[0].user_spec ) - else: - revision_id = None - - status = StatusDialog(wt, wt_path, revision_id) - status.connect("destroy", gtk.main_quit) - status.run() - - -class cmd_gsend(GTKCommand): - """GTK+ send merge directive. - - """ - def run(self): - (br, path) = branch.Branch.open_containing(".") - gtk = open_display() - from bzrlib.plugins.gtk.mergedirective import SendMergeDirectiveDialog - from StringIO import StringIO - dialog = SendMergeDirectiveDialog(br) - if dialog.run() == gtk.RESPONSE_OK: - outf = StringIO() - outf.writelines(dialog.get_merge_directive().to_lines()) - mail_client = br.get_config().get_mail_client() - mail_client.compose_merge_request(dialog.get_mail_to(), "[MERGE]", - outf.getvalue()) - - - - -class cmd_gconflicts(GTKCommand): - """GTK+ conflicts. - - Select files from the list of conflicts and run an external utility to - resolve them. - """ - def run(self): - (wt, path) = workingtree.WorkingTree.open_containing('.') - open_display() - from bzrlib.plugins.gtk.conflicts import ConflictsDialog - dialog = ConflictsDialog(wt) - dialog.run() - - -class cmd_gpreferences(GTKCommand): - """ GTK+ preferences dialog. - - """ - def run(self): - open_display() - from bzrlib.plugins.gtk.preferences import PreferencesWindow - dialog = PreferencesWindow() - dialog.run() - - -class cmd_gmerge(Command): - """ GTK+ merge dialog - - """ - takes_args = ["merge_from_path?"] - def run(self, merge_from_path=None): - from bzrlib import workingtree - from bzrlib.plugins.gtk.dialog import error_dialog - from bzrlib.plugins.gtk.merge import MergeDialog - - (wt, path) = workingtree.WorkingTree.open_containing('.') - old_tree = wt.branch.repository.revision_tree(wt.branch.last_revision()) - delta = wt.changes_from(old_tree) - if len(delta.added) or len(delta.removed) or len(delta.renamed) or len(delta.modified): - error_dialog(_i18n('There are local changes in the branch'), - _i18n('Please commit or revert the changes before merging.')) - else: - parent_branch_path = wt.branch.get_parent() - merge = MergeDialog(wt, path, parent_branch_path) - response = merge.run() - merge.destroy() - - -class cmd_gmissing(Command): - """ GTK+ missing revisions dialog. - - """ - takes_args = ["other_branch?"] - def run(self, other_branch=None): - pygtk = import_pygtk() - try: - import gtk - except RuntimeError, e: - if str(e) == "could not open display": - raise NoDisplayError - - from bzrlib.plugins.gtk.missing import MissingWindow - from bzrlib.branch import Branch - - local_branch = Branch.open_containing(".")[0] - if other_branch is None: - other_branch = local_branch.get_parent() - - if other_branch is None: - raise errors.BzrCommandError("No peer location known or specified.") - remote_branch = Branch.open_containing(other_branch)[0] - set_ui_factory() - local_branch.lock_read() - try: - remote_branch.lock_read() - try: - dialog = MissingWindow(local_branch, remote_branch) - dialog.run() - finally: - remote_branch.unlock() - finally: - local_branch.unlock() - - -class cmd_ginit(GTKCommand): - def run(self): - open_display() - from initialize import InitDialog - dialog = InitDialog(os.path.abspath(os.path.curdir)) - dialog.run() - - -class cmd_gtags(GTKCommand): - def run(self): - br = branch.Branch.open_containing('.')[0] - - gtk = open_display() - from tags import TagsWindow - window = TagsWindow(br) - window.show() - gtk.main() - - -commands = [ - cmd_gannotate, - cmd_gbranch, - cmd_gcheckout, - cmd_gcommit, - cmd_gconflicts, - cmd_gdiff, - cmd_ginit, - cmd_gmerge, - cmd_gmissing, - cmd_gpreferences, - cmd_gpush, - cmd_gsend, - cmd_gstatus, - cmd_gtags, - cmd_visualise - ] - -try: - from bzrlib.plugins import loom -except ImportError: - pass # Loom plugin doesn't appear to be present -else: - commands.append(cmd_gloom) - -for cmd in commands: - register_command(cmd) - - -class cmd_gselftest(GTKCommand): - """Version of selftest that displays a notification at the end""" - - takes_args = builtins.cmd_selftest.takes_args - takes_options = builtins.cmd_selftest.takes_options - _see_also = ['selftest'] - - def run(self, *args, **kwargs): - import cgi - import sys - default_encoding = sys.getdefaultencoding() - # prevent gtk from blowing up later - gtk = import_pygtk() - # prevent gtk from messing with default encoding - import pynotify - if sys.getdefaultencoding() != default_encoding: - reload(sys) - sys.setdefaultencoding(default_encoding) - result = builtins.cmd_selftest().run(*args, **kwargs) - if result == 0: - summary = 'Success' - body = 'Selftest succeeded in "%s"' % os.getcwd() - if result == 1: - summary = 'Failure' - body = 'Selftest failed in "%s"' % os.getcwd() - pynotify.init("bzr gselftest") - note = pynotify.Notification(cgi.escape(summary), cgi.escape(body)) - note.set_timeout(pynotify.EXPIRES_NEVER) - note.show() - - -register_command(cmd_gselftest) - - -class cmd_test_gtk(GTKCommand): - """Version of selftest that just runs the gtk test suite.""" - - takes_options = ['verbose', - Option('one', short_name='1', - help='Stop when one test fails.'), - Option('benchmark', help='Run the benchmarks.'), - Option('lsprof-timed', - help='Generate lsprof output for benchmarked' - ' sections of code.'), - Option('list-only', - help='List the tests instead of running them.'), - Option('randomize', type=str, argname="SEED", - help='Randomize the order of tests using the given' - ' seed or "now" for the current time.'), - ] - takes_args = ['testspecs*'] - - def run(self, verbose=None, one=False, benchmark=None, - lsprof_timed=None, list_only=False, randomize=None, - testspecs_list=None): - from bzrlib import __path__ as bzrlib_path - from bzrlib.tests import selftest - - print '%10s: %s' % ('bzrlib', bzrlib_path[0]) - if benchmark: - print 'No benchmarks yet' - return 3 - - test_suite_factory = bench_suite - if verbose is None: - verbose = True - # TODO: should possibly lock the history file... - benchfile = open(".perf_history", "at", buffering=1) - else: - test_suite_factory = test_suite - if verbose is None: - verbose = False - benchfile = None - - if testspecs_list is not None: - pattern = '|'.join(testspecs_list) - else: - pattern = ".*" - - try: - result = selftest(verbose=verbose, - pattern=pattern, - stop_on_failure=one, - test_suite_factory=test_suite_factory, - lsprof_timed=lsprof_timed, - bench_history=benchfile, - list_only=list_only, - random_seed=randomize, - ) - finally: - if benchfile is not None: - benchfile.close() - -register_command(cmd_test_gtk) - - - -import gettext -gettext.install('olive-gtk') - -# Let's create a specialized alias to protect '_' from being erased by other -# uses of '_' as an anonymous variable (think pdb for one). -_i18n = gettext.gettext - -class NoDisplayError(BzrCommandError): - """gtk could not find a proper display""" - - def __str__(self): - return "No DISPLAY. Unable to run GTK+ application." - - -def test_suite(): - from unittest import TestSuite - import tests - import sys - default_encoding = sys.getdefaultencoding() - try: - result = TestSuite() - try: - import_pygtk() - except errors.BzrCommandError: - return result - result.addTest(tests.test_suite()) - finally: - if sys.getdefaultencoding() != default_encoding: - reload(sys) - sys.setdefaultencoding(default_encoding) - return result diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/NEWS /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/NEWS --- bzr-gtk-0.95.0/NEWS 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/NEWS 2008-11-07 17:01:12.000000000 +0000 @@ -1,3 +1,17 @@ +0.96.0 UNRELEASED + + UI + + * Add colored status messages in Olive file list (Jasper Groenewegen) + + CHANGES + + * Add ginfo command line option (Jasper Groenewegen) + + BUG FIXES + + * Fix Olive homepage URL. (#255152) + 0.95.0 2008-08-04 UI diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/notify.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/notify.py --- bzr-gtk-0.95.0/notify.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/notify.py 2008-11-07 17:01:12.000000000 +0000 @@ -17,6 +17,16 @@ """Notification area icon and notification for Bazaar.""" import gtk +import bzrlib + + +def has_dbus(): + return (getattr(bzrlib.plugins, "dbus", None) is not None) + + +def has_avahi(): + return (getattr(bzrlib.plugins, "avahi", None) is not None) + class NotifyPopupMenu(gtk.Menu): def __init__(self): @@ -24,26 +34,26 @@ self.create_items() def create_items(self): + item = gtk.CheckMenuItem('_Gateway to LAN') + item.connect('toggled', self.toggle_lan_gateway) + self.append(item) + self.append(gtk.SeparatorMenuItem()) try: from bzrlib.plugins.dbus.activity import LanGateway self.langateway = LanGateway() - item = gtk.CheckMenuItem('_Gateway to LAN') - item.connect('toggled', self.toggle_lan_gateway) - self.append(item) - self.append(gtk.SeparatorMenuItem()) except ImportError: - pass + item.set_sensitive(False) + item = gtk.CheckMenuItem('Announce _branches on LAN') + item.connect('toggled', self.toggle_announce_branches) + self.append(item) + self.append(gtk.SeparatorMenuItem()) try: from bzrlib.plugins.avahi.share import ZeroConfServer from bzrlib import urlutils self.zeroconfserver = ZeroConfServer(urlutils.normalize_url('.')) - item = gtk.CheckMenuItem('Announce _branches on LAN') - item.connect('toggled', self.toggle_announce_branches) - self.append(item) - self.append(gtk.SeparatorMenuItem()) except ImportError: - pass + item.set_sensitive(False) item = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES, None) item.connect('activate', self.show_preferences) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/olive/info.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/olive/info.py --- bzr-gtk-0.95.0/olive/info.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/olive/info.py 2008-11-07 17:01:12.000000000 +0000 @@ -156,7 +156,7 @@ return # Create the window - self.window = gtk.Dialog(title="Olive - Information", + self.window = gtk.Dialog(title="Branch Information", parent = None, flags=0, buttons=None) @@ -226,6 +226,11 @@ def _generate_info(self, infokeylist): """ Generate 'bzr info' output. """ + expander={} + alignment={} + table={} + label = {} + description = {} for key, keystring, subkeylist in infokeylist: if self.ret.has_key(key): tablelength = 0 @@ -235,31 +240,34 @@ if tablelength == 0: pass else: - exec "exp_%s = gtk.Expander('%s')"%(key, keystring) - eval("exp_%s.set_use_markup(True)"%key) - eval("exp_%s.connect('activate', self.activate)"%key) + expander[key] = gtk.Expander(keystring) + expander[key].set_use_markup(True) + expander[key].connect('activate', self.activate) - exec "alignment_%s = gtk.Alignment()"%key - eval("alignment_%s.set_padding(0, 0, 24, 0)"%key) - eval("exp_%s.add(alignment_%s)"%(key, key)) + alignment[key]= gtk.Alignment() + alignment[key].set_padding(0, 0, 24, 0) + expander[key].add(alignment[key]) - exec "table_%s = gtk.Table(tablelength, 2)"%key - eval("table_%s.set_col_spacings(12)"%key) - eval("alignment_%s.add(table_%s)"%(key, key)) + table[key] = gtk.Table(tablelength, 2) + table[key].set_col_spacings(12) + alignment[key].add(table[key]) + + label[key] = {} + description[key] = {} tablepos = 0 for subkey, subkeystring in subkeylist: if self.ret[key].has_key(subkey): - exec "%s_%s_label = gtk.Label('%s:')"%(key,subkey, subkeystring) - eval("table_%s.attach(%s_%s_label, 0, 1, %i, %i, gtk.FILL)"%(key, key, subkey, tablepos, tablepos + 1)) - eval("%s_%s_label.set_alignment(0, 0.5)"%(key, subkey)) + label[key][subkey] = gtk.Label(subkeystring) + table[key].attach(label[key][subkey], 0, 1, tablepos, tablepos + 1, gtk.FILL) + label[key][subkey].set_alignment(0, 0.5) - exec "%s_%s = gtk.Label('%s')"%(key, subkey, str(self.ret[key][subkey])) - eval("table_%s.attach(%s_%s, 1, 2, %i, %i, gtk.FILL)"%(key, key, subkey, tablepos, tablepos + 1)) - eval("%s_%s.set_alignment(0, 0.5)"%(key, subkey)) + description[key][subkey] = gtk.Label(str(self.ret[key][subkey])) + table[key].attach(description[key][subkey], 1, 2, tablepos, tablepos + 1, gtk.FILL) + description[key][subkey].set_alignment(0, 0.5) tablepos += 1 - eval("exp_%s.set_expanded(True)"%key) - eval("self.window.vbox.pack_start(exp_%s, False, True, 0)"%key) + expander[key].set_expanded(True) + self.window.vbox.pack_start(expander[key], False, True, 0) def activate(self, expander): """ Redraw the window. """ diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/olive/__init__.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/olive/__init__.py --- bzr-gtk-0.95.0/olive/__init__.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/olive/__init__.py 2008-11-07 17:01:12.000000000 +0000 @@ -60,16 +60,14 @@ """ Display the AboutDialog. """ from bzrlib.plugins.gtk import __version__, icon_path - iconpath = icon_path() + os.sep - dialog = gtk.AboutDialog() dialog.set_name("Olive") dialog.set_version(__version__) - dialog.set_copyright("Copyright (C) 2006 Szilveszter Farkas (Phanatic)") - dialog.set_website("https://launchpad.net/products/olive") - dialog.set_website_label("https://launchpad.net/products/olive") - dialog.set_icon_from_file(iconpath+"oliveicon2.png") - dialog.set_logo(gtk.gdk.pixbuf_new_from_file(iconpath+"oliveicon2.png")) + dialog.set_copyright("Copyright (C) 2006-2008 Szilveszter Farkas (Phanatic)") + dialog.set_website("https://launchpad.net/bzr-gtk") + dialog.set_website_label("https://launchpad.net/bzr-gtk") + dialog.set_icon_from_file(icon_path("oliveicon2.png")) + dialog.set_logo(gtk.gdk.pixbuf_new_from_file(icon_path("oliveicon2.png"))) dialog.set_authors([ _i18n("Lead Developer:"), "Szilveszter Farkas ", _i18n("Contributors:"), @@ -83,6 +81,7 @@ # Destroy the dialog dialog.destroy() + class OliveGtk: """ The main Olive GTK frontend class. This is called when launching the program. """ @@ -134,9 +133,6 @@ self.combobox_drive.show() self.gen_hard_selector() - # Acceptable errors when loading files/folders in the treeviews - self.acceptable_errors = (errno.ENOENT, errno.ELOOP) - self.refresh_left() # Apply menu state @@ -532,7 +528,7 @@ @show_bzr_error def on_menuitem_branch_update_activate(self, widget): - """ Brranch/checkout update menu handler. """ + """ Branch/checkout update menu handler. """ ret = self.wt.update() conflicts = self.wt.conflicts() @@ -540,6 +536,7 @@ info_dialog(_i18n('Update successful but conflicts generated'), _i18n('Number of conflicts generated: %d.') % (len(conflicts),) ) else: info_dialog(_i18n('Update successful'), _i18n('No conflicts generated.') ) + self.refresh_right() def on_menuitem_branch_push_activate(self, widget): """ Branch/Push... menu handler. """ @@ -660,7 +657,6 @@ remove.hide() if response == gtk.RESPONSE_OK: - self.set_path(self.path) self.refresh_right() remove.destroy() @@ -703,12 +699,14 @@ def on_menuitem_view_show_hidden_files_activate(self, widget): """ View/Show hidden files menu handler. """ self.pref.set_preference('dotted_files', widget.get_active()) + self.pref.write() if self.path is not None: self.refresh_right() def on_menuitem_view_show_ignored_files_activate(self, widget): """ Hide/Show ignored files menu handler. """ self.pref.set_preference('ignored_files', widget.get_active()) + self.pref.write() if self.path is not None: self.refresh_right() @@ -875,7 +873,7 @@ self.pref.write() self.window.destroy() - + def get_selected_fileid(self): """ Get the file_id of the selected file. """ treeselection = self.window.treeview_right.get_selection() @@ -940,32 +938,33 @@ for title_item in bookmarks: liststore.append(title_item) - # Add the ListStore to the TreeView + # Add the ListStore to the TreeView and refresh column width self.window.treeview_left.set_model(liststore) + self.window.treeview_left.columns_autosize() def refresh_right(self): """ Refresh the file list. """ if not self.remote: # We're local from bzrlib.workingtree import WorkingTree - + path = self.get_path() # Get ListStore and clear it liststore = self.window.filelist liststore.clear() - + dirs = [] files = [] - + # Fill the appropriate lists dotted_files = self.pref.get_preference('dotted_files', 'bool') ignored_files = self.pref.get_preference('ignored_files', 'bool') - + for item in os.listdir(path): if not dotted_files and item[0] == '.': continue - if os.path.isdir(path + os.sep + item): + if os.path.isdir(os.path.join(path, item)): dirs.append(item) else: files.append(item) @@ -976,7 +975,7 @@ tree1 = WorkingTree.open_containing(os.path.realpath(path))[0] branch = tree1.branch tree2 = tree1.branch.repository.revision_tree(branch.last_revision()) - + delta = tree1.changes_from(tree2, want_unchanged=True) # Show Status column @@ -1001,13 +1000,7 @@ if not ignored_files and status == 'ignored': continue - try: - statinfo = os.stat(self.path + os.sep + item) - except OSError, e: - if e.errno in self.acceptable_errors: - continue - else: - raise + statinfo = os.lstat(os.path.join(self.path, item)) liststore.append([ gtk.STOCK_DIRECTORY, True, item, @@ -1029,13 +1022,7 @@ if not ignored_files and status == 'ignored': continue - try: - statinfo = os.stat(self.path + os.sep + item) - except OSError, e: - if e.errno in self.acceptable_errors: - continue - else: - raise + statinfo = os.lstat(os.path.join(self.path, item)) liststore.append([gtk.STOCK_FILE, False, item, diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/olive/window.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/olive/window.py --- bzr-gtk-0.95.0/olive/window.py 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/olive/window.py 2008-11-07 17:01:12.000000000 +0000 @@ -419,6 +419,8 @@ # Set up the cells cellpb = gtk.CellRendererPixbuf() cell = gtk.CellRendererText() + # For columns that get a different text color based on status (4) + cellstatus = gtk.CellRendererText() self.col_filename = gtk.TreeViewColumn(_i18n('Filename')) self.col_filename.pack_start(cellpb, False) @@ -429,8 +431,9 @@ self.treeview_right.append_column(self.col_filename) self.col_status = gtk.TreeViewColumn(_i18n('Status')) - self.col_status.pack_start(cell, True) - self.col_status.add_attribute(cell, 'text', 3) + self.col_status.pack_start(cellstatus, True) + self.col_status.add_attribute(cellstatus, 'text', 3) + self.col_status.set_cell_data_func(cellstatus, self._map_status_color) self.col_status.set_resizable(True) self.treeview_right.append_column(self.col_status) @@ -459,6 +462,32 @@ self.col_size.set_sort_column_id(5) self.col_mtime.set_sort_column_id(7) + def _map_status_color(self, column, cell, model, iter): + status = model.get_value(iter, 4) + if status == 'unchanged': + colorstatus = gtk.gdk.color_parse('black') + weight = 400 # standard value + elif status == 'removed': + colorstatus = gtk.gdk.color_parse('red') + weight = 800 + elif status == 'added': + colorstatus = gtk.gdk.color_parse('green') + weight = 800 + elif status == 'modified': + colorstatus = gtk.gdk.color_parse("#FD00D3") + weight = 800 + elif status == 'renamed': + colorstatus = gtk.gdk.color_parse('blue') + weight = 800 + elif status == 'ignored': + colorstatus = gtk.gdk.color_parse('grey') + weight = 600 + else: # status == unknown + colorstatus = gtk.gdk.color_parse('orange') + weight = 800 + cell.set_property('foreground-gdk', colorstatus) + cell.set_property('weight', weight) + def set_view_to_localbranch(self, notbranch=False): """ Change the sensitivity of gui items to reflect the fact that the path is a branch or not""" self.mb_branch_initialize.set_sensitive(notbranch) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/olive-gtk /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/olive-gtk --- bzr-gtk-0.95.0/olive-gtk 2008-08-04 19:08:58.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/olive-gtk 2008-11-07 17:01:12.000000000 +0000 @@ -51,9 +51,8 @@ try: import gtk - import gtk.glade except: - print >>sys.stderr, ('You need to install python-glade2 and/or pygtk2 (gtk2)' + print >>sys.stderr, ('You need to install pygtk2 (gtk2)' ' or set your PYTHONPATH correctly.\n' 'try: export PYTHONPATH=/usr/local/lib/python2.4/site-packages/' ) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/preferences/identity.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/preferences/identity.py --- bzr-gtk-0.95.0/preferences/identity.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/preferences/identity.py 2008-11-07 17:01:12.000000000 +0000 @@ -26,12 +26,13 @@ def __init__(self, config): self.config = config gtk.Table.__init__(self, rows=4, columns=2) + self.set_border_width(12) self.set_row_spacings(6) self.set_col_spacings(6) - align = gtk.Alignment(1.0, 0.5) + align = gtk.Alignment(0.0, 0.5) label = gtk.Label() - label.set_markup("User Id:") + label.set_markup("E-Mail:") align.add(label) self.attach(align, 0, 1, 0, 1, gtk.FILL, gtk.FILL) @@ -39,9 +40,9 @@ self.username.set_text(self.config.username()) self.attach(self.username, 1, 2, 0, 1, gtk.EXPAND | gtk.FILL, gtk.FILL) - align = gtk.Alignment(1.0, 0.5) + align = gtk.Alignment(0.0, 0.5) label = gtk.Label() - label.set_markup("GPG signing command:") + label.set_markup("GPG signing command:") align.add(label) self.attach(align, 0, 1, 1, 2, gtk.FILL, gtk.FILL) @@ -49,9 +50,9 @@ self.email.set_text(self.config.gpg_signing_command()) self.attach(self.email, 1, 2, 1, 2, gtk.EXPAND | gtk.FILL, gtk.FILL) - align = gtk.Alignment(1.0, 0.5) + align = gtk.Alignment(0.0, 0.1) label = gtk.Label() - label.set_markup("Check GPG Signatures:") + label.set_markup("Check GPG Signatures:") align.add(label) self.attach(align, 0, 1, 2, 3, gtk.FILL, gtk.FILL) @@ -68,9 +69,9 @@ # FIXME: Set default self.attach(sigvals, 1, 2, 2, 3, gtk.EXPAND | gtk.FILL, gtk.FILL) - align = gtk.Alignment(1.0, 0.5) + align = gtk.Alignment(0.0, 0.1) label = gtk.Label() - label.set_markup("Create GPG Signatures:") + label.set_markup("Create GPG Signatures:") align.add(label) self.attach(align, 0, 1, 3, 4, gtk.FILL, gtk.FILL) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/preferences/__init__.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/preferences/__init__.py --- bzr-gtk-0.95.0/preferences/__init__.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/preferences/__init__.py 2008-11-07 17:01:12.000000000 +0000 @@ -25,6 +25,7 @@ from bzrlib.config import GlobalConfig from identity import IdentityPage from plugins import PluginsPage +from notifications import NotificationsPage class PreferencesWindow(gtk.Dialog): """Displays global preferences windows.""" @@ -37,24 +38,31 @@ """ Initialize the Status window. """ super(PreferencesWindow, self).__init__(flags=gtk.DIALOG_MODAL) self.set_title("Bazaar Preferences") + self.set_has_separator(False) self.config = config if self.config is None: self.config = GlobalConfig() self._create() - self._create_pages() - def _create(self): - self.set_default_size(600, 600) + self.set_default_size(320, 480) + self.set_border_width(0) + notebook = gtk.Notebook() + notebook.set_border_width(12) for (label, page) in self._create_pages(): - notebook.insert_page(page, gtk.Label(label)) + notebook.append_page(page, gtk.Label(label)) + + notebook.set_current_page(0) + self.vbox.set_border_width(0) self.vbox.pack_start(notebook, True, True) self.vbox.show_all() + self.action_area.set_border_width(12) def _create_pages(self): return [("Identity", IdentityPage(self.config)), - ("Plugins", PluginsPage())] + ("Plugins", PluginsPage()), + ("Notifications", NotificationsPage(self.config))] def display(self): self.window.show_all() diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/preferences/notifications.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/preferences/notifications.py --- bzr-gtk-0.95.0/preferences/notifications.py 1970-01-01 01:00:00.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/preferences/notifications.py 2008-11-07 17:01:12.000000000 +0000 @@ -0,0 +1,79 @@ +# Copyright (C) 2008 Jelmer Vernooij +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +try: + import pygtk + pygtk.require("2.0") +except: + pass + +import gtk + +import bzrlib.plugins.gtk +from bzrlib.plugins.gtk.notify import has_avahi, has_dbus + +def has_email(): + return (getattr(bzrlib.plugins, "email", None) is not None) + +def has_cia(): + return (getattr(bzrlib.plugins, "cia", None) is not None) + + +class NotificationsPage(gtk.VBox): + def __init__(self, config, homogeneous=False, spacing=6): + self.config = config + gtk.VBox.__init__(self, homogeneous=homogeneous, spacing=spacing) + self.set_spacing(spacing) # The vertical one + + lan_frame = gtk.Frame("LAN Notifications") + + lan_vbox = gtk.VBox() + lan_frame.add(lan_vbox) + + self.gateway_to_lan = gtk.CheckButton("_Gateway to LAN") + lan_vbox.pack_start(self.gateway_to_lan) + self.gateway_to_lan.set_sensitive(has_dbus()) + + self.announce_on_lan = gtk.CheckButton("_Announce on LAN") + lan_vbox.pack_start(self.announce_on_lan) + self.announce_on_lan.set_sensitive(has_avahi()) + + self.pack_start(lan_frame) + + email_frame = gtk.Frame("E-mail notifications") + + email_hbox = gtk.HBox() + self.send_email = gtk.CheckButton("Send _E-Mail to") + email_hbox.pack_start(self.send_email) + self.send_email_to = gtk.Entry() + email_hbox.pack_start(self.send_email_to) + + email_frame.add(email_hbox) + email_frame.set_sensitive(has_email()) + + self.pack_start(email_frame) + + cia_frame = gtk.Frame("CIA notifications") + + cia_user_hbox = gtk.HBox() + cia_user_hbox.pack_start(gtk.Label("Author name")) + self.cia_user = gtk.Entry() + cia_user_hbox.pack_start(self.cia_user) + + cia_frame.add(cia_user_hbox) + cia_frame.set_sensitive(has_cia()) + + self.pack_start(cia_frame) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/preferences/plugins.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/preferences/plugins.py --- bzr-gtk-0.95.0/preferences/plugins.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/preferences/plugins.py 2008-11-07 17:01:12.000000000 +0000 @@ -25,14 +25,19 @@ class PluginsPage(gtk.VPaned): def __init__(self): gtk.VPaned.__init__(self) + self.set_border_width(12) + self.set_position(216) + scrolledwindow = gtk.ScrolledWindow() scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + scrolledwindow.set_shadow_type(gtk.SHADOW_IN) self.model = gtk.ListStore(str, str) treeview = gtk.TreeView() scrolledwindow.add(treeview) self.pack1(scrolledwindow, resize=True, shrink=False) self.table = gtk.Table(columns=2) + self.table.set_border_width(12) self.table.set_row_spacings(6) self.table.set_col_spacings(6) @@ -74,7 +79,7 @@ self.table.remove(w) if getattr(p, '__author__', None) is not None: - align = gtk.Alignment(1.0, 0.5) + align = gtk.Alignment(0.0, 0.5) label = gtk.Label() label.set_markup("Author:") align.add(label) @@ -90,7 +95,7 @@ self.table.attach(align, 1, 2, 0, 1, gtk.EXPAND | gtk.FILL, gtk.FILL) if getattr(p, '__version__', None) is not None: - align = gtk.Alignment(1.0, 0.5) + align = gtk.Alignment(0.0, 0.5) label = gtk.Label() label.set_markup("Version:") align.add(label) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/preferences/TODO /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/preferences/TODO --- bzr-gtk-0.95.0/preferences/TODO 1970-01-01 01:00:00.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/preferences/TODO 2008-11-07 17:01:12.000000000 +0000 @@ -0,0 +1,2 @@ +- per_file_commits +- push/pull/submit/public locations diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/seahorse.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/seahorse.py --- bzr-gtk-0.95.0/seahorse.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/seahorse.py 2008-11-07 17:01:12.000000000 +0000 @@ -40,6 +40,12 @@ name = get_name() else: name = getattr(e, '_dbus_error_name', None) + + if name is None: + args = getattr(e, 'args', None) # This is case for old python-dbus-0.62 + if args == ("Unable to determine the address of the message bus (try 'man dbus-launch' and 'man dbus-daemon' for help)",): + raise ImportError + # DBus sometimes fails like this, just treat it as if seahorse is not # available rather than crashing. if name in ("org.freedesktop.DBus.Error.Spawn.ExecFailed", diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/setup.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/setup.py --- bzr-gtk-0.95.0/setup.py 2009-02-02 13:24:10.000000000 +0000 +++ bzr-gtk-0.95.0+bzr622/setup.py 2008-11-07 17:01:12.000000000 +0000 @@ -1,8 +1,10 @@ #!/usr/bin/python + """GTK+ Frontends for various Bazaar commands.""" from distutils.core import setup, Command from distutils.command.install_data import install_data +from distutils.command.build import build from distutils.dep_util import newer from distutils.log import info import glob @@ -33,6 +35,50 @@ result = runner.run(suite) return result.wasSuccessful() + +class CreateCredits(Command): + description = "Create credits file" + + user_options = [("url=", None, "URL of branch")] + + def initialize_options(self): + self.url = "." + + def finalize_options(self): + pass + + def get_command_name(self): + return 'build_credits' + + def run(self): + from bzrlib.plugin import load_plugins; load_plugins() + from bzrlib.branch import Branch + from bzrlib.plugins.stats import find_credits + + import pickle + + branch = Branch.open(self.url) + credits = find_credits(branch.repository, branch.last_revision()) + + pickle.dump(credits, file("credits.pickle", 'w')) + return True + + +def is_versioned(cmd): + from bzrlib.errors import NotBranchError + try: + from bzrlib.branch import Branch + Branch.open(".") + return True + except NotBranchError: + return False + + +class BuildData(build): + sub_commands = build.sub_commands[:] + sub_commands.append(('build_credits', is_versioned)) + + class InstallData(install_data): def run(self): self.data_files.extend(self._compile_po_files()) @@ -91,12 +137,13 @@ setup( name = "bzr-gtk", - version = "0.95.0", + version = "0.96.0", maintainer = "Jelmer Vernooij", maintainer_email = "jelmer@samba.org", description = "GTK+ Frontends for various Bazaar commands", license = "GNU GPL v2 or later", - scripts=['olive-gtk', 'bzr-handle-patch', 'bzr-notify'], + scripts = ['olive-gtk', 'bzr-handle-patch', 'bzr-notify'], + url = "http://bazaar-vcs.org/BzrGtk", package_dir = { "bzrlib.plugins.gtk": ".", "bzrlib.plugins.gtk.viz": "viz", @@ -118,7 +165,7 @@ data_files=[('share/olive', ['cmenu.ui', ]), ('share/bzr-gtk', ['credits.pickle']), - ('share/bzr-gtk/icons', ['icons/commit.png', + ('share/bzr-gtk/icons', ['icons/commit.png', 'icons/commit16.png', 'icons/diff.png', 'icons/diff16.png', @@ -152,5 +199,7 @@ 'icons/emblem-bzr-removed.svg']) ], cmdclass={'install_data': InstallData, + 'build_credits': CreateCredits, + 'build': BuildData, 'check': Check} ) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/status.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/status.py --- bzr-gtk-0.95.0/status.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/status.py 2008-11-07 17:01:12.000000000 +0000 @@ -21,23 +21,25 @@ pass import gtk -from bzrlib.plugins.gtk import _i18n +from bzrlib.plugins.gtk import ( + _i18n, + window, + ) -class StatusDialog(gtk.Dialog): +class StatusWindow(window.Window): """ Display Status window and perform the needed actions. """ def __init__(self, wt, wtpath, revision=None): """ Initialize the Status window. """ - super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) + super(StatusWindow, self).__init__() self.set_title("Working tree changes") - self.set_default_response(gtk.RESPONSE_CLOSE) self._create() self.wt = wt self.wtpath = wtpath if revision is None: revision = self.wt.branch.last_revision() - + # Set the old working tree self.old_tree = self.wt.branch.repository.revision_tree(revision) # Generate status output @@ -45,20 +47,17 @@ def _create(self): self.set_default_size(400, 300) - self.set_has_separator(False) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) sw.set_shadow_type(gtk.SHADOW_IN) self.treeview = gtk.TreeView() sw.add(self.treeview) - self.vbox.pack_start(sw, True, True) - self.vbox.show_all() + self.add(sw) # sane border and spacing widths (as recommended by GNOME HIG) self.set_border_width(5) sw.set_border_width(5) - self.vbox.set_spacing(2) - self.action_area.set_border_width(5) + self.show_all() def row_diff(self, tv, path, tvc): @@ -78,18 +77,18 @@ self.treeview.set_headers_visible(False) self.treeview.set_model(self.model) self.treeview.connect("row-activated", self.row_diff) - + cell = gtk.CellRendererText() cell.set_property("width-chars", 20) column = gtk.TreeViewColumn() column.pack_start(cell, expand=True) column.add_attribute(cell, "text", 0) self.treeview.append_column(column) - + delta = self.wt.changes_from(self.old_tree) changes = False - + if len(delta.added): changes = True titer = self.model.append(None, [ _i18n('Added'), None ]) @@ -114,7 +113,7 @@ titer = self.model.append(None, [ _i18n('Modified'), None ]) for path, id, kind, text_modified, meta_modified in delta.modified: self.model.append(titer, [ path, path ]) - + done_unknown = False for path in self.wt.unknowns(): changes = True @@ -127,6 +126,6 @@ self.model.append(None, [ _i18n('No changes.'), None ]) self.treeview.expand_all() - + def close(self, widget=None): self.window.destroy() diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/tests/test_commit.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/tests/test_commit.py --- bzr-gtk-0.95.0/tests/test_commit.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/tests/test_commit.py 2008-11-07 17:01:12.000000000 +0000 @@ -651,7 +651,7 @@ def _set_question_yes(self, dlg): """Set the dialog to answer YES to any questions.""" self.questions = [] - def _question_yes(*args): + def _question_yes(*args, **kwargs): self.questions.append(args) self.questions.append('YES') return gtk.RESPONSE_YES @@ -660,7 +660,7 @@ def _set_question_no(self, dlg): """Set the dialog to answer NO to any questions.""" self.questions = [] - def _question_no(*args): + def _question_no(*args, **kwargs): self.questions.append(args) self.questions.append('NO') return gtk.RESPONSE_NO @@ -708,7 +708,7 @@ self.assertEqual(last_rev, dlg.committed_revision_id) self.assertEqual(last_rev, tree.branch.last_revision()) - def test_commit_no_message(self): + def test_commit_empty_message(self): tree = self.make_branch_and_tree('tree') self.build_tree(['tree/a', 'tree/b']) tree.add(['a'], ['a-id']) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/tests/test_diff.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/tests/test_diff.py --- bzr-gtk-0.95.0/tests/test_diff.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/tests/test_diff.py 2008-11-07 17:01:12.000000000 +0000 @@ -18,7 +18,11 @@ from cStringIO import StringIO import os -from bzrlib import errors, tests +from bzrlib import ( + conflicts, + errors, + tests, + ) from bzrlib.merge_directive import MergeDirective2 from bzrlib.plugins.gtk.diff import ( @@ -303,3 +307,57 @@ [('a-id', 'a', 'removed', 'a'), ('b-id', 'b', 'removed', 'b/'), ], tree) + + def test_status_missing_file(self): + this = self.make_branch_and_tree('this') + self.build_tree(['this/foo']) + this.add(['foo'], ['foo-id']) + this.commit('add') + + other = this.bzrdir.sprout('other').open_workingtree() + + os.remove('this/foo') + this.remove('foo', force=True) + this.commit('remove') + + f = open('other/foo', 'wt') + try: + f.write('Modified\n') + finally: + f.close() + other.commit('modified') + + this.merge_from_branch(other.branch) + conflicts.resolve(this) + + self.assertStatusEqual( + [('foo-id', 'foo.OTHER', 'missing', 'foo.OTHER'),], + this) + + def test_status_missing_directory(self): + this = self.make_branch_and_tree('this') + self.build_tree(['this/foo/', 'this/foo/bar']) + this.add(['foo', 'foo/bar'], ['foo-id', 'bar-id']) + this.commit('add') + + other = this.bzrdir.sprout('other').open_workingtree() + + os.remove('this/foo/bar') + os.rmdir('this/foo') + this.remove('foo', force=True) + this.commit('remove') + + f = open('other/foo/bar', 'wt') + try: + f.write('Modified\n') + finally: + f.close() + other.commit('modified') + + this.merge_from_branch(other.branch) + conflicts.resolve(this) + + self.assertStatusEqual( + [('foo-id', u'foo', 'added', u'foo/'), + ('bar-id', u'foo/bar.OTHER', 'missing', u'foo/bar.OTHER'),], + this) diff -Nru /tmp/IcEFcm5FsR/bzr-gtk-0.95.0/window.py /tmp/PAuBPUBZwZ/bzr-gtk-0.95.0+bzr622/window.py --- bzr-gtk-0.95.0/window.py 2008-08-04 19:08:59.000000000 +0100 +++ bzr-gtk-0.95.0+bzr622/window.py 2008-11-07 17:01:12.000000000 +0000 @@ -7,9 +7,9 @@ def __init__(self, parent=None): gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) self._parent = parent - + self.connect('key-press-event', self._on_key_press) - + def _on_key_press(self, widget, event): keyname = gtk.gdk.keyval_name(event.keyval) if event.state & gtk.gdk.CONTROL_MASK: