Mercurial > hgsubversion
changeset 649:2060e0ca8dd5
svnwrap: add get_revision(); a thing wrapper around ra.do_update()
This function allows us to fetch the entire contents of a revision in
a reasonably efficient manner.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Tue, 20 Jul 2010 11:55:07 +0200 |
parents | 8fb38602e3ed |
children | 685f91015ed6 |
files | hgsubversion/svnwrap/svn_swig_wrapper.py |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/svnwrap/svn_swig_wrapper.py +++ b/hgsubversion/svnwrap/svn_swig_wrapper.py @@ -549,6 +549,17 @@ class SubversionRepo(object): else: raise + def get_revision(self, revision, editor): + ''' feed the contents of the given revision to the given editor ''' + + e_ptr, e_baton = delta.make_editor(editor) + + reporter, reporter_baton = ra.do_update(self.ra, revision, "", True, + e_ptr, e_baton) + + reporter.set_path(reporter_baton, "", revision, True, None) + reporter.finish_report(reporter_baton) + def get_unified_diff(self, path, revision, other_path=None, other_rev=None, deleted=True, ignore_type=False): """Gets a unidiff of path at revision against revision-1.