Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900880

[webrev] abort: cannot follow file not in parent revision: <file>

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      When processing committed changesets, for each modified/added/removed/renamed file, webrev attempts to add a comment line indicating the changeset in which the files was involved.

      This happens in the comments_from_mercurial() function.

      This function eventually calls some form of hg log --follow - such as:
      hg log --rev <rev1> --rev <rev2> --rev .... -- follow --template 'rev {rev} : {desc}\n' <file>

      It appears that this command does not work when the file in question doesn't exists (because one of the changesets removed it).

      The consequence of seeing the 'abort: cannot follow file not in parent revision: <file>' when calling webrev is however benign: the final webrev is still workable, but the link to the removed files don't show any revision information (so you don't know which changeset removed them).

      Presumably comments_from_mercurial() might be improved by first checking whether the file ($logf) exists, and if it doesn't, it could call hg log -v for each revision to figure out which revision should be listed for this file...

            Unassigned Unassigned
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: