/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Martin Pool
  • Date: 2005-07-11 03:32:25 UTC
  • Revision ID: mbp@sourcefrog.net-20050711033225-c754f139a7667700
- reenable blackbox test module

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
           verbose=True,
26
26
           specific_files=None,
27
27
           rev_id=None,
28
 
           allow_pointless=True):
 
28
           allow_empty=True):
29
29
    """Commit working copy as a new revision.
30
30
 
31
31
    The basic approach is to add all the file texts into the
42
42
    be robust against files disappearing, moving, etc.  So the
43
43
    whole thing is a bit hard.
44
44
 
45
 
    This raises PointlessCommit if there are no changes, no new merges,
46
 
    and allow_pointless  is false.
 
45
    This raises EmptyCommit if there are no changes, no new merges,
 
46
    and allow_empty is false.
47
47
 
48
48
    timestamp -- if not None, seconds-since-epoch for a
49
49
         postdated/predated commit.
63
63
 
64
64
    from bzrlib.osutils import local_time_offset, username
65
65
    from bzrlib.branch import gen_file_id
66
 
    from bzrlib.errors import BzrError, PointlessCommit
 
66
    from bzrlib.errors import BzrError, EmptyCommit
67
67
    from bzrlib.revision import Revision, RevisionReference
68
68
    from bzrlib.trace import mutter, note
69
69
    from bzrlib.xml import pack_xml
97
97
                                    specific_files,
98
98
                                    verbose)
99
99
 
100
 
        if not (any_changes or allow_pointless or pending_merges):
101
 
            raise PointlessCommit()
 
100
        if not (any_changes or allow_empty or pending_merges):
 
101
            raise EmptyCommit()
102
102
 
103
103
        for file_id in missing_ids:
104
104
            # Any files that have been deleted are now removed from the
211
211
        working inventory.
212
212
    """
213
213
    from bzrlib.inventory import Inventory
214
 
    from bzrlib.osutils import isdir, isfile, sha_string, quotefn, \
 
214
    from osutils import isdir, isfile, sha_string, quotefn, \
215
215
         local_time_offset, username, kind_marker, is_inside_any
216
216
    
217
 
    from bzrlib.branch import gen_file_id
218
 
    from bzrlib.errors import BzrError
219
 
    from bzrlib.revision import Revision
 
217
    from branch import gen_file_id
 
218
    from errors import BzrError
 
219
    from revision import Revision
220
220
    from bzrlib.trace import mutter, note
221
221
 
222
222
    any_changes = False
223
 
    inv = Inventory(work_inv.root.file_id)
 
223
    inv = Inventory()
224
224
    missing_ids = []
225
225
    
226
226
    for path, entry in work_inv.iter_entries():