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

  • Committer: Jelmer Vernooij
  • Date: 2010-02-28 16:17:06 UTC
  • mto: This revision was merged to the branch mainline in revision 686.
  • Revision ID: jelmer@samba.org-20100228161706-of6do4olu1l7o8vb
Fix formatting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
from errors import show_bzr_error
27
27
 
28
 
# FIXME: This needs to be public JRV 20070714
29
 
from bzrlib.builtins import _create_prefix
30
28
from bzrlib.config import LocationConfig
31
29
import bzrlib.errors as errors
32
30
 
94
92
        """ Push button clicked handler. """
95
93
        location = self._combo.get_child().get_text()
96
94
        revs = 0
97
 
        if self.branch is not None and self.branch.get_push_location() is None:
98
 
            response = question_dialog(_i18n('Set default push location'),
99
 
                                       _i18n('There is no default push location set.\nSet %r as default now?') % location)
100
 
            if response == gtk.RESPONSE_OK:
101
 
                self.branch.set_push_location(location)
102
 
 
 
95
        
103
96
        try:
104
97
            revs = do_push(self.branch, location=location, overwrite=False)
105
98
        except errors.DivergedBranches:
108
101
            if response == gtk.RESPONSE_YES:
109
102
                revs = do_push(self.branch, location=location, overwrite=True)
110
103
        
 
104
        if self.branch is not None and self.branch.get_push_location() is None:
 
105
            self.branch.set_push_location(location)
 
106
        
111
107
        self._history.add_entry(location)
112
108
        info_dialog(_i18n('Push successful'),
113
109
                    _i18n("%d revision(s) pushed.") % revs)
146
142
            response = question_dialog(_i18n('Non existing parent directory'),
147
143
                         _i18n("The parent directory (%s)\ndoesn't exist. Create?") % location)
148
144
            if response == gtk.RESPONSE_OK:
149
 
                _create_prefix(transport)
 
145
                transport.create_prefix()
150
146
            else:
151
147
                return
152
148
        dir_to = br_from.bzrdir.clone(location_url,