~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to bzrtools.py

  • Committer: Aaron Bentley
  • Date: 2005-10-29 18:40:48 UTC
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: abentley@panoramicfeedback.com-20051029184048-88c7e2e0fc56481f
Updated GPL notices

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    >>> file(fooname, "wb").write("bar")
44
44
    >>> is_clean(br)
45
45
    (True, [u'foo'])
46
 
    >>> br.working_tree().add(["foo"])
 
46
    >>> bzrlib.add.smart_add_branch(br, [br.base])
 
47
    1
47
48
    >>> is_clean(br)
48
49
    (False, [])
49
 
    >>> br.working_tree().commit("added file")
 
50
    >>> br.commit("added file")
50
51
    >>> is_clean(br)
51
52
    (True, [])
52
53
    >>> rm_branch(br)
59
60
        if file_class in ('?', 'I'):
60
61
            non_source.append(path)
61
62
    delta = compare_trees(old_tree, new_tree, want_unchanged=False)
62
 
    return not delta.has_changed(), non_source
 
63
    if len(delta.added) > 0 or len(delta.removed) > 0 or \
 
64
        len(delta.modified) > 0:
 
65
        return False, non_source
 
66
    return True, non_source 
63
67
 
64
68
def set_pull_data(br, location, rev_id):
65
69
    pull_file = file (br.controlfilename("x-pull-data"), "wb")
254
258
        push_location = location
255
259
    
256
260
    if push_location is None:
257
 
        raise bzrlib.errors.MustUseDecorated
258
 
 
259
 
    if push_location.find('://') != -1:
260
 
        raise bzrlib.errors.MustUseDecorated
261
 
 
262
 
    if push_location.find(':') == -1:
263
 
        raise bzrlib.errors.MustUseDecorated
 
261
        print "No push location saved.  Please specify one on the command line."
 
262
        sys.exit(1)
264
263
 
265
264
    clean, non_source = is_clean(cur_branch)
266
265
    if not clean: