Doesn't handle commits with directory replacements from excluded paths

Issue #458 new
Former user created an issue

The contents of my filemap:

exclude c

The structure of my SVN repo directories:

└── trunk
    ├── a
    ├── b
    └── c
        └── a

The command I use to convert this repo to Hg:

hg clone file://`pwd`/test.repo/trunk --filemap filemap test.hg

Notice the /trunk suffix! And it fails on this revision:

Changed paths:
   R /trunk/a (from /trunk/c/a:21)
   M /trunk/a/1.txt
   D /trunk/c/a

With an error like: "Trying to open deleted file …"

I investigated the source code and found that the problem is with this line:

The entries inside self._missing gets without a root prefix, while they are removed later with a root prefix. But even if I fix this stuff, it still works wrong - the replaced files are marked as undeleted (not deleted + added with new content!) and the SVN transaction content doesn't apply properly:

    raise AssertionError("%d != %d" % (len(tview), tview_len))
AssertionError: 20165 != 24185

What is a right way to fix this problem? - I'm ready to fix it by myself.

Comments (0)

  1. Log in to comment