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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-03 14:32:03 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-20060803143203-26d8f3067e646294
Implemented Status window; some code cleanups.

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

    * olive/frontend/gtk/status.py: Status window implemented
    * olive.glade: Status window designed and Branch/status menu added

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
91
91
    
92
92
    :param new: if True, the 'added' files will be removed
93
93
    """
 
94
    import bzrlib
94
95
    from bzrlib.builtins import tree_files
95
96
    
96
97
    try:
105
106
            raise NoFilesSpecified
106
107
    else:
107
108
        from bzrlib.delta import compare_trees
108
 
        added = [compare_trees(tree.basis_tree(), tree,
109
 
                               specific_files=file_list).added]
 
109
        if (bzrlib.version_info[0] == 0) and (bzrlib.version_info[1] < 9):
 
110
            added = [compare_trees(tree.basis_tree(), tree,
 
111
                                   specific_files=file_list).added]
 
112
        else:
 
113
            added = [tree.changes_from(tree.basis_tree(),
 
114
                                       specific_files=file_list).added]
110
115
        file_list = sorted([f[0] for f in added[0]], reverse=True)
111
116
        if len(file_list) == 0:
112
117
            raise NoMatchingFiles