~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Ian Clatworthy
  • Date: 2009-06-01 08:55:17 UTC
  • mto: (4427.1.2 integration)
  • mto: This revision was merged to the branch mainline in revision 4431.
  • Revision ID: ian.clatworthy@canonical.com-20090601085517-8ex4vw00ini524x9
fix status & commit issue reported by Frits Jalvingh

Show diffs side-by-side

added added

removed removed

Lines of Context:
3062
3062
                    if source_minikind != 'f':
3063
3063
                        content_change = True
3064
3064
                    else:
3065
 
                        # If the size is the same, check the sha:
3066
 
                        if target_details[2] == source_details[2]:
3067
 
                            if link_or_sha1 is None:
3068
 
                                # Stat cache miss:
3069
 
                                statvalue, link_or_sha1 = \
3070
 
                                    self.state._sha1_provider.stat_and_sha1(
3071
 
                                    path_info[4])
3072
 
                                self.state._observed_sha1(entry, link_or_sha1,
3073
 
                                    statvalue)
3074
 
                            content_change = (link_or_sha1 != source_details[1])
3075
 
                        else:
3076
 
                            # Size changed, so must be different
3077
 
                            content_change = True
 
3065
                        # Check the sha. We can't just rely on the size as
 
3066
                        # content filtering may mean differ sizes actually
 
3067
                        # map to the same content
 
3068
                        if link_or_sha1 is None:
 
3069
                            # Stat cache miss:
 
3070
                            statvalue, link_or_sha1 = \
 
3071
                                self.state._sha1_provider.stat_and_sha1(
 
3072
                                path_info[4])
 
3073
                            self.state._observed_sha1(entry, link_or_sha1,
 
3074
                                statvalue)
 
3075
                        content_change = (link_or_sha1 != source_details[1])
3078
3076
                    # Target details is updated at update_entry time
3079
3077
                    if self.use_filesystem_for_exec:
3080
3078
                        # We don't need S_ISREG here, because we are sure