[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Fixed for svnlook.py Which Produces an Error When a Path is Deleted

From: Jeremy Whitlock <jcscoobyrs_at_gmail.com>
Date: Mon, 4 Aug 2008 16:16:41 -0600

Hi All,
    I found another issue with svnlook.py which resulted in an error.
In this scenario, whenever you deleted a path pointing to a file from
Subversion and then use svnlook.py's diff command to view the diff
output, an error is thrown:

python svnlook.py /opt/repos/svn/test/ rev 8 diff
Traceback (most recent call last):
  File "svnlook.py", line 386, in <module>
  File "svnlook.py", line 383, in main
    SVNLook(sys.argv[1], cmd, rev, txn)
  File "svnlook.py", line 38, in __init__
    getattr(self, 'cmd_' + cmd)()
  File "svnlook.py", line 70, in cmd_diff
    self._print_tree(DiffEditor, pass_root=1)
  File "svnlook.py", line 128, in _print_tree
    e_ptr, e_baton, authz_cb, 0, 1, 0, 0)
  File "/opt/subversion/lib/svn-python/libsvn/repos.py", line 294, in
    return apply(_repos.svn_repos_dir_delta, args)
  File "svnlook.py", line 294, in delete_entry
    self._do_diff(path, None)
  File "svnlook.py", line 268, in _do_diff
    print "Removed: " + path
TypeError: cannot concatenate 'str' and 'NoneType' objects

This patch fixes this issue and the result is an svnlook.py that
properly handles deleted files when using the diff command.

Take care,


P.S. - I emailed a patch earlier to fix diff in general. Without that
patch applied, you will error out before you get to the point in the
script that this patch fixes.

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-08-05 00:16:53 CEST

This is an archived mail posted to the Subversion Dev mailing list.