~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Martin Pool
  • Date: 2005-06-20 03:31:09 UTC
  • Revision ID: mbp@sourcefrog.net-20050620033109-1d7ae0b3a6ce2708
- better warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
    def _get_precursor(self):
82
82
        from warnings import warn
83
 
        warn("Revision.precursor is deprecated")
 
83
        warn("Revision.precursor is deprecated", stacklevel=2)
84
84
        if self.parents:
85
85
            return self.parents[0].revision_id
86
86
        else:
89
89
 
90
90
    def _get_precursor_sha1(self):
91
91
        from warnings import warn
92
 
        warn("Revision.precursor_sha1 is deprecated")
 
92
        warn("Revision.precursor_sha1 is deprecated", stacklevel=2)
93
93
        if self.parents:
94
94
            return self.parents[0].revision_sha1
95
95
        else: