~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Martin Pool
  • Date: 2005-07-18 11:41:06 UTC
  • Revision ID: mbp@sourcefrog.net-20050718114106-1130a9c7b902dd34
- allow for parents specified to Weave.add to be a set

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
        
227
227
            return new_version
228
228
 
229
 
        if len(parents) == 1 and sha1 == self._sha1s[parents[0]]:
230
 
            # special case: same as the single parent
231
 
            return new_version
 
229
        if len(parents) == 1:
 
230
            pv = list(parents)[0]
 
231
            if sha1 == self._sha1s[pv]:
 
232
                # special case: same as the single parent
 
233
                return new_version
232
234
            
233
235
 
234
236
        ancestors = self.inclusions(parents)
274
276
            i1 = basis_lineno[i1]
275
277
            i2 = basis_lineno[i2]
276
278
 
277
 
            assert 0 <= i1 <= i2 <= len(old_l)
278
279
            assert 0 <= j1 <= j2 <= len(text)
279
280
 
280
281
            #print tag, i1, i2, j1, j2