#5854 SVN incorrectly shows empty dirs

v1.0.0
closed
SCM
2015-08-20
2013-02-20
No

https://sourceforge.net/p/hl7api/code/574/tree/releases/2.0/src/license/ shows an empty dir but it should show header.txt. (see http://hl7api.svn.sf.net/viewvc/hl7api/releases/2.0/src/license/?pathrev=574 for reference)

We cleared out the pyforge.repo_last_commit doc and it got reconstructed without entries: { "_id" : ObjectId("512550211be1ce3ea2b96d12"), "commit_id" : "50d1ee88e88f3d0bb0cae0a8:574", "path" : "releases/2.0/src/license", "entries" : [ ] } and this path/rev doesn't exist in legacy LCD collections. So it seems that the LCD building logic has a bug, perhaps via a bad DiffInfoDoc?

Cory says we should also make Tree._lcd_map handle bad LCD entries better, as well as Blob.prev_commit

Related

Tickets: #5605
Tickets: #5790
Tickets: #5910

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-02-21

    Potentially related to [#5810] issues? I discovered several examples of this when validating [#5810] in prod. Here's some more that can be checked:

    10:28:54,636 ERROR [forgesvn.model.svn] Error computing tree for <Repository /svn/p/zeoslib/code-0>: <Commit 500986a671b75b2b8b001f0f:154>(tags/6.6.0-beta/database)
    10:32:25,150 ERROR [forgesvn.model.svn] Error computing tree for <Repository /nfs/sf-svn/g/gl/glfw/svn>: <Commit 509c39705fcbc917c1b7238f:1536>(tags/2.7.4/support/msvc90)
    10:32:35,580 ERROR [forgesvn.model.svn] Error computing tree for <Repository /svn/p/zeoslib/code-0>: <Commit 500986a671b75b2b8b001f0f:154>(tags/6.6.0-beta/src)
    13:08:04,822 ERROR [forgesvn.model.svn] Error computing tree for <Repository /svn/p/zeoslib/code-0>: <Commit 500986a671b75b2b8b001f0f:222>(tags/6.6.1-beta/packages)
    13:35:03,547 ERROR [forgesvn.model.svn] Error computing tree for <Repository /nfs/sf-svn/e/el/elogviewer/svn>: <Commit 50e6b15634309d7db13ec98d:103>(elogviewer/tags/0.6.3)
    13:39:57,362 ERROR [forgesvn.model.svn] Error computing tree for <Repository /nfs/sf-svn/g/gl/glfw/svn>: <Commit 509c39705fcbc917c1b7238f:1548>(tags/2.7.5/support/msvc100)
    16:05:40,256 ERROR [forgesvn.model.svn] Error computing tree for <Repository /nfs/sf-svn/h/hl/hl7api/code>: <Commit 50d1ee88e88f3d0bb0cae0a8:574>(releases/2.0/src/license/header.txt)
    19:02:30,824 ERROR [forgesvn.model.svn] Error computing tree for <Repository /svn/p/judoshiai/code>: <Commit 503f1e4fbfc09e389018b9c6:274>(tags/version-2.2/doc)
    19:09:09,119 ERROR [forgesvn.model.svn] Error computing tree for <Repository /nfs/sf-svn/g/gl/glfw/svn>: <Commit 509c39705fcbc917c1b7238f:4>(tags/start/docs/glfw)
    
     

    Related

    Tickets: #5810

  • Dave Brondsema

    Dave Brondsema - 2013-02-22
    • size: --> 4
     
  • Cory Johns - 2013-02-28
    • status: open --> in-progress
    • assigned_to: Cory Johns
     
  • Cory Johns - 2013-02-28

    allura:cj/5854

     
  • Cory Johns - 2013-02-28
    • status: in-progress --> code-review
     
  • Cory Johns - 2013-03-01

    Oops, forgot the _lcd_map part. Added.

     
  • Dave Brondsema

    Dave Brondsema - 2013-03-05
    • qa: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-05
    • status: code-review --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-05

    Your last commit has a syntax error and won't even run:

      vim +555 /home/dbrondsema/dbrondsema-7024/forge/Allura/allura/model/repo.py
        href=self.repo.url_for_commit(commit_info['id']) if 'id' in commit_info,
                                                                               ^
    SyntaxError: invalid syntax
    

    I made a minor fix to that to see if it'd work despite it. I tested by importing the elogviewer repo since it only has 103 revs and exhibits this bug at https://sourceforge.net/p/elogviewer/svn/103/tree/elogviewer/tags/0.6.3/ Importing that repo reproduced the issue on master, then I switched to cj/5854 and didn't do any repo refresh, just reloaded the page and got:

    File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/templates/widgets/repo/tree_widget.html', line 33 in top-level template code
      <td class="nowrap">{{lib.abbr_date(dirent.last_commit.date)}}</td>
    File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/templates/jinja_master/lib.html', line 78 in template
      {{h.ago(start_time)}}
    File '/home/dbrondsema/dbrondsema-7024/forge/Allura/allura/lib/helpers.py', line 257 in ago
      if end_time - start_time > timedelta(days=7):
    TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str'
    
     
  • Chris Tsai - 2013-03-05
    • labels: --> support, p3
     
  • Cory Johns - 2013-03-06
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-06
    • status: code-review --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-06

    Past the syntax error, but still getting the TypeError as noted above

     
  • Cory Johns - 2013-03-07

    Had to import the repo on master to reproduce; this branch fixes the bug that caused the bad data that caused the TypeError. Resolved to work with the bad data, and force-pushed.

     
  • Cory Johns - 2013-03-07
    • labels: support, p3 -->
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-07
    • labels: --> support, p3
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-07
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2013-03-07

    Now it shows the directory listing, but unfortunately the last commit metadata is wrong, so it shows blank/unknown values. And we don't currently have a way to refresh LCDs for SVN repos. Need to wait until we can move aside all the old LCD data

     

Log in to post a comment.