~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Jelmer Vernooij
  • Date: 2009-03-28 14:24:46 UTC
  • mfrom: (4211 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4212.
  • Revision ID: jelmer@samba.org-20090328142446-vqi0ksswdurga631
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
# The newly committed revision is going to have a shape corresponding
259
259
                               " parameter is required for commit().")
260
260
 
261
261
        self.bound_branch = None
262
 
        self.any_entries_changed = False
263
262
        self.any_entries_deleted = False
264
263
        if exclude is not None:
265
264
            self.exclude = sorted(
438
437
        # unless deletes occured, in which case the length is irrelevant.
439
438
        if (self.any_entries_deleted or
440
439
            (len(self.builder.new_inventory) != 1 and
441
 
             self.any_entries_changed)):
 
440
             self.builder.any_changes())):
442
441
            return
443
442
        raise PointlessCommit()
444
443
 
689
688
                # required after that changes.
690
689
                if len(self.parents) > 1:
691
690
                    ie.revision = None
692
 
                _, version_recorded, _ = self.builder.record_entry_contents(
693
 
                    ie, self.parent_invs, path, self.basis_tree, None)
694
 
                if version_recorded:
695
 
                    self.any_entries_changed = True
 
691
                self.builder.record_entry_contents(ie, self.parent_invs, path,
 
692
                    self.basis_tree, None)
696
693
 
697
694
    def _report_and_accumulate_deletes(self):
698
695
        # XXX: Could the list of deleted paths and ids be instead taken from
854
851
            ie.revision = None
855
852
        # For carried over entries we don't care about the fs hash - the repo
856
853
        # isn't generating a sha, so we're not saving computation time.
857
 
        _, version_recorded, fs_hash = self.builder.record_entry_contents(
 
854
        _, _, fs_hash = self.builder.record_entry_contents(
858
855
            ie, self.parent_invs, path, self.work_tree, content_summary)
859
 
        if version_recorded:
860
 
            self.any_entries_changed = True
861
856
        if report_changes:
862
857
            self._report_change(ie, path)
863
858
        if fs_hash: