~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-15 13:20:18 UTC
  • mfrom: (1924 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1926.
  • Revision ID: john@arbash-meinel.com-20060815132018-b753fd07689ac31a
[merge] bzr.dev 1924

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
 
18
18
# XXX: Can we do any better about making interrupted commits change
19
 
# nothing?  Perhaps the best approach is to integrate commit of
20
 
# AtomicFiles with releasing the lock on the Branch.
 
19
# nothing?  
21
20
 
22
21
# TODO: Separate 'prepare' phase where we find a list of potentially
23
22
# committed files.  We then can then pause the commit to prompt for a
71
70
 
72
71
from cStringIO import StringIO
73
72
 
74
 
from bzrlib.atomicfile import AtomicFile
75
73
import bzrlib.config
76
74
import bzrlib.errors as errors
77
75
from bzrlib.errors import (BzrError, PointlessCommit,
308
306
                raise PointlessCommit()
309
307
 
310
308
            self._emit_progress_update()
311
 
            # TODO: Now the new inventory is known, check for conflicts and prompt the 
312
 
            # user for a commit message.
 
309
            # TODO: Now the new inventory is known, check for conflicts and
 
310
            # prompt the user for a commit message.
 
311
            # ADHB 2006-08-08: If this is done, populate_new_inv should not add
 
312
            # weave lines, because nothing should be recorded until it is known
 
313
            # that commit will succeed.
313
314
            self.builder.finish_inventory()
314
315
            self._emit_progress_update()
315
316
            self.rev_id = self.builder.commit(self.message)
502
503
        # in bugs like #46635.  Any reason not to use/enhance Tree.changes_from?
503
504
        # ADHB 11-07-2006
504
505
        mutter("Selecting files for commit with filter %s", self.specific_files)
505
 
        # at this point we dont copy the root entry:
506
506
        entries = self.work_inv.iter_entries()
507
 
        entries.next()
508
 
        self._emit_progress_update()
 
507
        if not self.builder.record_root_entry:
 
508
            warnings.warn('CommitBuilders should support recording the root'
 
509
                ' entry as of bzr 0.10.', DeprecationWarning, stacklevel=1)
 
510
            self.builder.new_inventory.add(self.basis_inv.root.copy())
 
511
            entries.next()
 
512
            self._emit_progress_update()
509
513
        for path, new_ie in entries:
510
514
            self._emit_progress_update()
511
515
            file_id = new_ie.file_id