Keep svn_repos_get_logs3 from using an unbounded amount of memory when it is given multiple targets.  This fixes issue #2494.
Keep svn_repos_get_logs3 from using an unbounded amount of memory
when it is given multiple targets.  This fixes issue #2494.

* subversion/libsvn_repos/log.c
  (path_info): Make path a stringbuf, add two new boolean flags.
  (get_history): Take a pool argument, add an alternate mode of
   operation where we open the history object each time instead of
   holding it open.  Instead of setting info->hist to NULL when we
   are done with it, set info->done.
  (check_history): Take a pool argument, pass it to get_history,
   use info->done instead of info->hist to tell when we're done
   with a path.
  (next_history_rev): Use info->done instead of info->hist to tell
   when we're done with a path.
  (MAX_OPEN_HISTORIES): New define that controls how many history
   objects we'll keep open.
  (svn_repos_get_logs3): Only open MAX_OPEN_HISTORIES histories,
   for any additional paths the history will be opened as needed.
   Pass pool to get_history and use info->done to determine if we
   are done with a path.

jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion