~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Ian Clatworthy
  • Author(s): Robert Collins
  • Date: 2009-04-03 05:08:45 UTC
  • mfrom: (4241.4.1 bzr.bris-vf)
  • mto: This revision was merged to the branch mainline in revision 4245.
  • Revision ID: ian.clatworthy@canonical.com-20090403050845-w656xtmr19jtuovs
add sha generation support to versioned files (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
410
410
        version_id
411
411
            Symbolic name for this version.
412
412
            (Typically the revision-id of the revision that added it.)
 
413
            If None, a name will be allocated based on the hash. (sha1:SHAHASH)
413
414
 
414
415
        parents
415
416
            List or set of direct parent version numbers.
425
426
            sha1 = sha_strings(lines)
426
427
        if sha1 == nostore_sha:
427
428
            raise errors.ExistingContent
 
429
        if version_id is None:
 
430
            version_id = "sha1:" + sha1
428
431
        if version_id in self._name_map:
429
432
            return self._check_repeated_add(version_id, parents, lines, sha1)
430
433