Closed KangOl closed 11 years ago
As a rename is just a deletion followed by a append of the same file, all cases are covered. But if you insist, I can make a more complete test.
In git it is, not in bazaar.
git-remote-bzr only handle deletion and modifications. Anyway, I just commit a more complete test that cover all cases.
No:
for oldpath, newpath, fid, kind, mod, _ in changes.renamed:
removed[oldpath] = None
modified[newpath] = fid
See? A bzr rename is translated to a git add and remove.
That what I'm talking about. A rename in bzr is enough to test remove and add in git.
Suppose this:
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -187,13 +187,13 @@ def get_filechanges(cur, prev):
return s.encode('utf-8')
for path, fid, kind in changes.added:
- modified[u(path)] = fid
+ modified["foo"] = fid
for path, fid, kind in changes.removed:
- removed[u(path)] = None
+ removed["foo"] = None
for path, fid, kind, mod, _ in changes.modified:
modified[u(path)] = fid
for oldpath, newpath, fid, kind, mod, _ in changes.renamed:
- removed[u(oldpath)] = None
+ removed["foo"] = None
if kind == 'directory':
lst = cur.list_files(from_dir=newpath, recursive=True)
for path, file_class, kind, fid, entry in lst:
The checks would succeed, even though something is totally wrong.
Beside that this is not really test utf-8 filenames but the fact that filenames are respected, I completed the test.
It can be triggered also by UTF-8 issues. But anyway, the last one deals with everything, I've pushed it.
Thanks.
the previous fix handled only the addition of utf-8 named files, not the deletion (and renaming)