~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-11 05:22:11 UTC
  • mfrom: (4427.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090611052211-b6b2pu471mdja7zz
(igc) fix branch & status content filtering issues

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