#5775 Allura Code Viewer: provide "copied from" link in history view

v1.0.1
closed
nobody
42cc (432)
SCM
Cory Johns
2015-08-20
2013-02-07
Anonymous
No

Originally created by: dcommander

This is one of several tickets I am creating to log what I feel are shortcomings in the new (Allura) code viewer relative to the old (ViewVC) code viewer. In all of these cases, simply providing a way for users to continue using ViewVC would be an acceptable workaround.

In ViewVC, if a file or directory had been renamed, then the history view of said file/directory provided a link at the bottom that allowed one to easily browse the old history of the file/directory before it has been renamed. Example (see bottom of page):

http://libjpeg-turbo.svn.sourceforge.net/viewvc/libjpeg-turbo/trunk/turbojpeg.c?view=log

This is a critical feature for being able to visualize the history of a repository.

Related

Tickets: #5775
Tickets: #6629

Discussion

1 2 > >> (Page 1 of 2)
  • Dave Brondsema

    Dave Brondsema - 2013-07-22
    • labels: --> 42cc
    • Milestone: limbo --> forge-backlog
     
  • Dave Brondsema

    Dave Brondsema - 2013-07-22

    Now that our SCM history view gets its data directly from the underlying SCM tools instead of Mongo, it seems that we should be able to get rename/copy info from them fairly easily.

     
  • Igor Bondarenko - 2013-07-23

    Created:

    • #404 [#5775] Allura Code Viewer: provide "copied from" link in history view (Git) (3cp)
    • #405 [#5775] Allura Code Viewer: provide "copied from" link in history view (Svn) (2cp)
    • #406 [#5775] Allura Code Viewer: provide "copied from" link in history view (Hg) (1cp)
     

    Related

    Tickets: #5775

  • Igor Bondarenko - 2013-07-23
    • status: open --> in-progress
     
  • Anton Kasyanov - 2013-08-05

    I have a few questions about Git implementation.
    Currently we've done it with two limtations:

    Firstly, it works only if in a commit only one file was renamed. Git doesn't handle renames separately - this is just file deletion and file creation. So now when you go to file history it tries to find commit where file with current name was created and some other file deleted - then it is probably rename. To fix one-file-in-commit issue, we have to compare contents of the files and diffs and this can be time consuming. Do we have to or current implementation will be enough?

    Secondly, it doesn't show renames for folders (it works for files in the folder though). This seems to be possible to implement but logic will be very tricky. Do you need to show renames of folders?

     
  • Anonymous - 2013-08-05

    Originally by: dcommander

    From my point of view, I am simply trying to get back the SVN browsing functionality that ViewVC had, so the details of the git implementation aren't currently important to me personally, although others may have their own opinions on that. I would say that the same principle applies-- provide the same functionality that your old git viewer provided.

    The basic workflow I need is:
    -- pull up the history view of a file or folder
    -- if at some point in the history, the file/folder was renamed or moved, then I want a link to a history view of the previous incarnation of the file/folder, so I can keep tracing the history back.

    Currently, there is no way of distinguishing from the first revision of a file/folder and the first revision after it was copied/moved/renamed. Even if you know that it was copied/moved/renamed, it's difficult to figure out what the old name was, and even if you know the old name, you have to go through the trouble of setting a sticky revision in the browser in order to even find the old version in the tree.

     
  • Dave Brondsema

    Dave Brondsema - 2013-08-05

    Overall in the Allura SCM code we are moving away storing lots of metadata and doing computation ourselves. Rather, it'll be simpler, more robust, and often times faster to rely on the scm tool (e.g. git itself) to do the work for us.

    The log view controller has already been moved to this approach. It calls _iter_commits_with_refs which calls into gitpython to get the data. See if you can get the rename data from git there. I know if I run git log --stat I get output that includes lines like readme2.txt => readme3.txt | 1 + You may want to look at related options to "stat" to get the easiest-to-parse format. I know I've seen times where long file paths are truncated in that stat rename output.

    Renames of directories aren't too important I don't think. Directories consist of files, so if we show file renames that should be sufficient.

     
  • Anonymous - 2013-08-05

    Originally by: dcommander

    I agree, as long as a directory rename/copy/move will show up in all of the individual files it affects.

     
  • Anton Kasyanov - 2013-08-07

    closed #404, branch 42cc_5775

     
  • Anton Kasyanov - 2013-08-08

    By the way, it seems that there's a bug in ForgeSVN (or pysvn).
    How to reproduce
    - create a file, commit it
    - rename it using svn move {src} {dest}, commit
    - go to revision where file was created and open it's history
    - there should be at least one commit (about creation) but there are none of them

    I've spent little time debugging it and noticed that exception is thrown
    File not found: revision 3, path '/dir/a.txt', even if file was created in revision 2 and revision_start=revision_2

     
  • Anton Kasyanov - 2013-08-12

    Closed #405, branch 42cc_5775

     
  • Anton Kasyanov - 2013-08-12
    • status: in-progress --> code-review
     
    • QA: Tim Van Steenburgh
    • Milestone: forge-backlog --> forge-sep-06
     
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2013-09-04
    • status: closed --> open
    • QA: Tim Van Steenburgh --> nobody
     
  • Igor Bondarenko - 2013-09-05
    • status: open --> in-progress
     
  • Igor Bondarenko - 2013-09-05

    Created #433: [#5775] Allura Code Viewer: "copied from" improvements (2cp)

     

    Related

    Tickets: #5775

  • Dave Brondsema

    Dave Brondsema - 2013-09-06
    • Milestone: forge-sep-06 --> forge-sep-20
     
  • Dave Brondsema

    Dave Brondsema - 2013-09-20
    • Milestone: forge-sep-20 --> forge-oct-04
     
  • Igor Bondarenko - 2013-10-01
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2013-10-01

    Closed #433. je/42cc_5775

     
  • Anonymous - 2013-10-01

    Originally by: dcommander

    Hi. I'm having trouble parsing the status of this, but the published version still very definitely does not work for me. Is there a way to try out the "beta" version?

     
  • Dave Brondsema

    Dave Brondsema - 2013-10-02

    Sorry, DRC, not really. The changes first need to be reviewed and then pushed live to sf.net

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.