~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzrtools.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-18 20:37:53 UTC
  • mto: This revision was merged to the branch mainline in revision 421.
  • Revision ID: bialix@ukr.net-20060718203753-fa30c2f3cc59316b
don't use curses on win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    (True, [])
59
59
    >>> rm_tree(tree)
60
60
    """
 
61
    from bzrlib.diff import compare_trees
61
62
    old_tree = cur_tree.basis_tree()
62
63
    new_tree = cur_tree
63
64
    non_source = []
64
65
    for path, file_class, kind, file_id, entry in new_tree.list_files():
65
66
        if file_class in ('?', 'I'):
66
67
            non_source.append(path)
67
 
    delta = new_tree.changes_from(old_tree, want_unchanged=False)
 
68
    delta = compare_trees(old_tree, new_tree, want_unchanged=False)
68
69
    return not delta.has_changed(), non_source
69
70
 
70
71
def set_push_data(tree, location):
249
250
    if push_location is None:
250
251
        raise BzrCommandError("No rspush location known or specified.")
251
252
 
252
 
    if (push_location.find('::') != -1):
253
 
        usessh=False
254
 
    else:
255
 
        usessh=True
256
 
 
257
253
    if (push_location.find('://') != -1 or
258
254
        push_location.find(':') == -1):
259
255
        raise BzrCommandError("Invalid rsync path %r." % push_location)
288
284
                " specified location.  Please ensure that"
289
285
                ' "%s" is of the form "machine:/path".' % push_location)
290
286
    print "Pushing to %s" % push_location
291
 
    rsync(tree.basedir+'/', push_location, ssh=usessh, 
 
287
    rsync(tree.basedir+'/', push_location, ssh=True, 
292
288
          excludes=final_exclusions)
293
289
 
294
290
    set_push_data(tree, push_location)