~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzrtools.py

  • Committer: Aaron Bentley
  • Date: 2006-03-02 14:11:19 UTC
  • Revision ID: abentley@panoramicfeedback.com-20060302141119-7a5ee02eb6483c50
Only use the decorated push if it's likely to work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import bzrlib
27
27
import bzrlib.errors
 
28
from bzrlib.errors import BzrCommandError
28
29
from bzrlib.bzrdir import BzrDir
29
30
 
30
31
def temp_tree():
241
242
        push_location = location
242
243
    
243
244
    if push_location is None:
244
 
        raise bzrlib.errors.MustUseDecorated
 
245
        if tree.branch.get_push_location() is None:
 
246
            raise BzrCommandError("No push location known or specified.")
 
247
        else:
 
248
            raise bzrlib.errors.MustUseDecorated
245
249
 
246
250
    if push_location.find('://') != -1:
247
251
        raise bzrlib.errors.MustUseDecorated