Skip to content
  • Joseph Myers's avatar
    Address GitLab issue #80: SVN-to-git conversion with file and directory replacement operations · afc0f842
    Joseph Myers authored and Eric S. Raymond's avatar Eric S. Raymond committed
    Here is a candidate patch, including a smaller test that should be
    more or less minimal. The issue here is directory replacement
    operations (Node-kind: dir and Node-action: replace); these need to
    act on the filemap the same as a deletion does, as otherwise files in
    the old version of the directory stay around, along with files from
    the new version.
    
    Note: this should be reviewed carefully; there is no prior test
    coverage of Node-action: replace in SVN dumps at all. It's possible to
    have any combination of the path previously being a file or a
    directory, and being replaced by either a file or a directory, and all
    those combinations should probably be tested (including those where
    either old or new directory is empty); the test here only covers
    replacing a nonempty directory with a nonempty directory. In my
    experiments, if the replacement is with a file or directory copied
    from somewhere, instead of a new non-copy one, that appears in the SVN
    dump as delete/add operations, rather than as a replace operation, but
    I do not know if that is necessarily so.
    afc0f842