~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Robert Collins
  • Date: 2006-04-26 05:26:38 UTC
  • mto: (1686.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1687.
  • Revision ID: robertc@robertcollins.net-20060426052638-e95d815562fc6caa
Factor out version_ids-to-join selection in InterVersionedfile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
977
977
        if not other.versions():
978
978
            return          # nothing to update, easy
979
979
 
980
 
        if version_ids:
981
 
            for version_id in version_ids:
982
 
                if not other.has_version(version_id) and not ignore_missing:
983
 
                    raise RevisionNotPresent(version_id, self._weave_name)
984
 
        else:
985
 
            version_ids = other.versions()
 
980
        if not version_ids:
 
981
            # versions is never none, InterWeave checks this.
 
982
            return 0
986
983
 
987
984
        # two loops so that we do not change ourselves before verifying it
988
985
        # will be ok
1478
1475
 
1479
1476
    def join(self, pb=None, msg=None, version_ids=None, ignore_missing=False):
1480
1477
        """See InterVersionedFile.join."""
 
1478
        version_ids = self._get_source_version_ids(version_ids, ignore_missing)
1481
1479
        if self.target.versions() == [] and version_ids is None:
1482
1480
            self.target._copy_weave_content(self.source)
1483
1481
            return