Mercurial > hg
view tests/test-convert-darcs.out @ 9116:f90bbf1ea09f
inotify: fix issue1375, add a test.
The biggest problem was the data structure, which did not allow changing
a file into a directory or vice versa. This problem is fixed by b55d44719b47.
The walk() method also had an issue in this case:
- we know 'path' as a directory. inotify server sleeps.
- 'path' is deleted
- 'path' is recreated as a file
- the server catches up here, and see the deletion. it instantiates a scan(),
which in its turn calls for walk(repo, path).
- walk() then assumes that 'path' is a directory and calls os.listdir on it,
which raises an OSError(errno.ENOTDIR)
Catch the error, and yield the file instead of the directory contents.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 13 Jul 2009 16:49:05 +0200 |
parents | f29b7c8419cb |
children | b236f34ec1e9 |
line wrap: on
line source
% initialize darcs repo Finished recording patch 'p0' % branch and update Finished recording patch 'p1.1' % update source Finished recording patch 'p1.2' % merge branch We have conflicts in the following files: ./a Finished pulling and applying. Finished recording patch 'p2' initializing destination darcs-repo-hg repository scanning source... sorting... converting... 3 p0 2 p1.2 1 p1.1 0 p2 o 3 "p2" files: a | o 2 "p1.1" files: | o 1 "p1.2" files: a b | o 0 "p0" files: a 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a 1e88685f5ddec574a34c70af492f95b6debc8741 644 b