mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
2645ee079e
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 47d29dcb7266. 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.
47 lines
498 B
Plaintext
47 lines
498 B
Plaintext
adding a
|
|
adding b
|
|
adding c
|
|
adding d
|
|
adding dir/bar/foo
|
|
adding dir/x
|
|
adding dir/y
|
|
adding e
|
|
% inserve
|
|
? hg.pid
|
|
% clean
|
|
C a
|
|
C b
|
|
C c
|
|
C d
|
|
C dir/bar/foo
|
|
C dir/x
|
|
C dir/y
|
|
C e
|
|
% all
|
|
? hg.pid
|
|
C a
|
|
C b
|
|
C c
|
|
C d
|
|
C dir/bar/foo
|
|
C dir/x
|
|
C dir/y
|
|
C e
|
|
% path patterns
|
|
M dir/x
|
|
? hg.pid
|
|
M dir/x
|
|
M x
|
|
% issue 1375
|
|
adding h/h
|
|
adding hg.pid
|
|
removing h/h
|
|
A h
|
|
R h/h
|
|
M a
|
|
merging a
|
|
1 files updated, 1 files merged, 2 files removed, 0 files unresolved
|
|
M a
|
|
3 files updated, 1 files merged, 0 files removed, 0 files unresolved
|
|
M a
|