/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/frontend/gtk/push.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-01 16:16:31 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-20060801161631-ca1ac79e3726e307
Visual feedback when Olive is busy; follow bzr API changes; commit dialog update

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

    * olive/frontend/gtk/push.py: now the number of pushed revisions gets
      displayed (Fixed: #54698)
    * olive/backend/info.py: added is_checkout()
    * olive/frontend/gtk/commit.py: local commit checkbox shows up only if the
      current directory is a checkout
    * olive/backend/fileops.py: upgraded to new API (compare_trees deprecated)
    * many files: the cursor changes to a watch when performing time consuming
      operations (Fixed: #54015)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    pass
24
24
try:
25
25
    import gtk
 
26
    import gtk.gdk
26
27
    import gtk.glade
27
28
except:
28
29
    sys.exit(1)
93
94
        radio_stored = self.glade.get_widget('radiobutton_push_stored')
94
95
        radio_specific = self.glade.get_widget('radiobutton_push_specific')
95
96
        
 
97
        revs = 0
 
98
        self.comm.set_busy(self.window)
96
99
        if radio_stored.get_active():
97
100
            try:
98
 
                commit.push(self.comm.get_path())
 
101
                revs = commit.push(self.comm.get_path())
99
102
            except errors.NotBranchError:
100
103
                dialog.error_dialog('Directory is not a branch.')
101
104
                return
123
126
                                   self.check_create.get_active())
124
127
            except errors.NotBranchError:
125
128
                dialog.error_dialog('Directory is not a branch.')
 
129
                self.comm.set_busy(self.window, False)
126
130
                return
127
131
            except errors.NonExistingParent, errmsg:
128
132
                dialog.error_dialog('Parent directory doesn\'t exist: %s', errmsg)
 
133
                self.comm.set_busy(self.window, False)
129
134
                return
130
135
            except errors.DivergedBranchesError:
131
136
                dialog.error_dialog('Branches have been diverged.')
 
137
                self.comm.set_busy(self.window, False)
132
138
                return
133
139
            except errors.PathPrefixNotCreated:
134
140
                dialog.error_dialog('Path prefix couldn\'t be created.')
 
141
                self.comm.set_busy(self.window, False)
135
142
                return
136
143
            except:
137
144
                raise
139
146
            # This should really never happen
140
147
            pass
141
148
        
 
149
        self.close()
142
150
        dialog.info_dialog('%d revision(s) pushed.' % revs)
143
 
        self.close()
144
151
    
145
152
    def close(self, widget=None):
146
153
        self.window.destroy()