Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3406

svnmerge fails when encountering ssh warning

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • all
    • nonblocking
    • contrib/svnmerge.py
    • None


      When encountering unexpected input from 'svn info', in my case the warning:
      RSA host key for IP address '*.*.*.*' not in list of known hosts.
      svnmerge fails with the following backtrace:
      Traceback (most recent call last):
        File "/Users/grazer/bin/svnmerge.py", line 1946, in <module>
        File "/Users/grazer/bin/svnmerge.py", line 1941, in main
          cmd(branch_dir, branch_props)
        File "/Users/grazer/bin/svnmerge.py", line 1434, in __call__
          return self.func(*args, **kwargs)
        File "/Users/grazer/bin/svnmerge.py", line 1052, in action_avail
        File "/Users/grazer/bin/svnmerge.py", line 942, in analyze_head_revs
          end_rev = get_latest_rev(branch_url)
        File "/Users/grazer/bin/svnmerge.py", line 780, in get_latest_rev
          return get_svninfo(url)["Revision"]
        File "/Users/grazer/bin/svnmerge.py", line 705, in get_svninfo
          key, value = L.split(": ", 1)
      ValueError: need more than 1 value to unpack
      I brought this issue to the IRC channel, and discussed with 'stsp':
      [09:57am] stsp: grazer, and also, what's the output of svn info that is being
      parsed? why is that line lacking a colon?
      [09:57am] grazer: so I am getting a warning from ssh
      [09:58am] grazer: so I realize I should fix that
      [09:58am] stsp: why is that warning on stdout?
      [09:58am] grazer: but I figured svnmerge still shouldn't barf
      [09:58am] stsp: yes
      [09:58am] grazer: let me get that
      [09:58am] grazer: RSA host key for IP address '*.*.*.*' not in list of known hosts.
      [10:00am] stsp: grazer, but it's fine if you file a bug for this, attach a
      unidiff, and mention that you've discussed this with me on irc
      [10:00am] grazer: great, thanks
      [10:00am] stsp: it clearly should skip lines like that
      Here is a diff that fixes the issue for me:
      --- svnmerge.py       2009-04-28 09:42:58.000000000 -0500
      +++ svnmerge.py.1 2009-04-28 09:43:19.000000000 -0500
      @@ -702,6 +702,8 @@
               L = L.strip()
               if not L:
      +        if L.find(": ") < 0:
      +            continue 
               key, value = L.split(": ", 1)
               info[key] = value.strip()
               _cache_svninfo[path] = info

      Original issue reported by grazer



          This comment will be Viewable by All Users Viewable by All Users


            Unassigned Unassigned
            subversion-importer Subversion Importer




                Issue deployment