Centralize get_change() in the SVN backends.
Review Request #5982 — Created June 11, 2014 and submitted
This provides a single implementation of
get_change()
. It makes use of
the newget_log()
, and also a newdiff()
function in the backends. This
helps keep the code maintainable and bug-free.I've removed the commit cache stuff that was part of
get_change()
, since
we never actually ever saved anything in the cache. It's probably
unlikely we'll need to fetch the same commit info very often, so instead
of fixing the caching, I've just opted to save some memory and accesses
and remove it.There's a couple fixes in here I ran into for revision normalization as
well, and the removal of definitions and properties that are no longer
needed.
Unit tests pass for both backends.
Description | From | Last Updated |
---|---|---|
This should say that the returned diff is a unicode object. You're calling .decode() which means it's not encoded as … |
david | |
I'm not sure if the diff command can raise exceptions, but the .decode could. We should probably wrap this in … |
david | |
Same comment about "encoded" vs "unicode object" |
david | |
Should we check err here? |
david | |
undefined name '_' |
reviewbot |
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/scmtools/svn/subvertpy.py reviewboard/scmtools/svn/pysvn.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/svn/base.py Ignored Files:
- Change Summary:
-
- Improved error handling when diffing.
- Fixed docstrings to mention Unicode objects instead of UTF-8 strings.
- Commit:
-
ace784c61ef013fda39136039eb03322eaef6f4be604f7382c4b29b0178f4c5fcc5f797f27cbf6bf
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/svn/subvertpy.py reviewboard/scmtools/svn/pysvn.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/svn/base.py Ignored Files:
- Change Summary:
-
Fixed a missing import for
_()
- Commit:
-
e604f7382c4b29b0178f4c5fcc5f797f27cbf6bf193369af79689e89eb649ce8048dc7d2b0dadc82
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/scmtools/svn/subvertpy.py reviewboard/scmtools/svn/pysvn.py reviewboard/scmtools/svn/__init__.py reviewboard/scmtools/svn/base.py Ignored Files: