~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzrtools.py

  • Committer: Aaron Bentley
  • Date: 2006-05-10 01:29:41 UTC
  • mfrom: (364.1.4 bzrtools)
  • Revision ID: aaron.bentley@utoronto.ca-20060510012941-c46cf94b001d8d3e
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
    except RsyncNoFile:
242
242
        return True
243
243
 
244
 
def push(tree, location=None, overwrite=False, working_tree=True):
 
244
def rspush(tree, location=None, overwrite=False, working_tree=True):
245
245
    push_location = get_push_data(tree)
246
246
    if location is not None:
247
247
        if not location.endswith('/'):
249
249
        push_location = location
250
250
    
251
251
    if push_location is None:
252
 
        if tree.branch.get_push_location() is None:
253
 
            raise BzrCommandError("No push location known or specified.")
254
 
        else:
255
 
            raise bzrlib.errors.MustUseDecorated
256
 
 
257
 
    if push_location.find('://') != -1:
258
 
        raise bzrlib.errors.MustUseDecorated
259
 
 
260
 
    if push_location.find(':') == -1:
261
 
        raise bzrlib.errors.MustUseDecorated
 
252
        raise BzrCommandError("No rspush location known or specified.")
 
253
 
 
254
    if (push_location.find('://') != -1 or
 
255
        push_location.find(':') == -1):
 
256
        raise BzrCommandError("Invalid rsync path %r." % push_location)
262
257
 
263
258
    if working_tree:
264
259
        clean, non_source = is_clean(tree)