~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: INADA Naoki
  • Date: 2011-05-05 09:15:34 UTC
  • mto: (5830.3.3 i18n-msgfmt)
  • mto: This revision was merged to the branch mainline in revision 5873.
  • Revision ID: songofacandy@gmail.com-20110505091534-7sv835xpofwrmpt4
Add update-pot command to Makefile and tools/bzrgettext script that
extracts help text from bzr commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
from bzrlib import (
53
53
    debug,
54
54
    errors,
 
55
    revision,
55
56
    trace,
56
57
    tree,
57
58
    ui,
442
443
        except Exception, e:
443
444
            mutter("aborting commit write group because of exception:")
444
445
            trace.log_exception_quietly()
 
446
            note("aborting commit write group: %r" % (e,))
445
447
            self.builder.abort()
446
448
            raise
447
449
 
493
495
        # A merge with no effect on files
494
496
        if len(self.parents) > 1:
495
497
            return
 
498
        # TODO: we could simplify this by using self.builder.basis_delta.
 
499
 
 
500
        # The initial commit adds a root directory, but this in itself is not
 
501
        # a worthwhile commit.
 
502
        if (self.basis_revid == revision.NULL_REVISION and
 
503
            ((self.builder.new_inventory is not None and
 
504
             len(self.builder.new_inventory) == 1) or
 
505
            len(self.builder._basis_delta) == 1)):
 
506
            raise PointlessCommit()
496
507
        if self.builder.any_changes():
497
508
            return
498
509
        raise PointlessCommit()
723
734
        if self.specific_files or self.exclude:
724
735
            specific_files = self.specific_files or []
725
736
            for path, old_ie in self.basis_inv.iter_entries():
726
 
                if self.builder.new_inventory.has_id(old_ie.file_id):
 
737
                if old_ie.file_id in self.builder.new_inventory:
727
738
                    # already added - skip.
728
739
                    continue
729
740
                if (is_inside_any(specific_files, path)