GithubHelp home page GithubHelp logo

Comments (4)

vladak avatar vladak commented on August 21, 2024

The problem with melted filenames described on https://java.net/projects/opengrok/lists/dev/archive/2013-03/message/33 probably went away to some degree (or was hidden) with e7cd132.

from opengrok.

vladak avatar vladak commented on August 21, 2024

Also, I discovered that findOriginalName() does not quite work correctly. It was comparing full revision string with short string which makes it fail for some of the changesets. This will be fixed too with this change.

from opengrok.

vladak avatar vladak commented on August 21, 2024

Facts:

  • if user clicks on revision link in History view in the UI hg cat -r REV FILE is invoked and its output is displayed in HTML format. similarly when comparing 2 revisions, 2 such commands are invoked and their oututs compared and formatted.
  • hg cat -r REV FILE does not work for renamed files, for this to work the FILE needs to be the original file name in revision REV
  • hg log -f FILE follows the renames of given file through renames (f means follow), this allows to find the original name of the file so that it can be passed to the hg cat command above
  • reindex of the whole repository basically performs hg log on the top-level directory of the repo and converts the output into list of HistoryEntry objects (one object maps to one changeset), together with files changes in given revision. File based cache then inverts this list and constructs a Map which maps file name into list of revisions which changed that file. This does not work for renamed files because the current name only maps to revisions in which it was changed under current name, not to revisions in which it was changed under the old name(s). Although JDBC cache does not perform this inversion (it is performed when querying by the DB) it has similar problem.

The overall approach to this fix:

  • assemble a list of files which were changed (once or more, does not matter) during reindex
  • store history cache entries for never-renamed files as is done currently. Once this is over get the full history for renamed files using getHistory() (which is able to find the complete history of the file because it runs hg log -f FILE) and generate the history entries for these files separately.

from opengrok.

vladak avatar vladak commented on August 21, 2024

For reference, this all started with #388.

from opengrok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.