This week I worked on support for directories in patch index changes, testing the correlation between patch index and existing commands, and some minor refactoring.
Implementation of directory support in changes
Patch index changes uses patch index to filter out the unrelated patches of the repository. A patch that does not modify any selected file gets filtered out. A file will be selected if it had a path that is a subpath of the given directory at any point in the repository history.
Tests on correlation:
I have tested for correlation on changes with files using the below script. I ran the script on darcs screened repository, and found that it succeeded on all files. A similar script for annotate has also succeeded.
Changes on directories fails to give the same output, with a simple example given below: In the above example, the patch index version fails to give the middle two patches. This is so because the file a was never under dir2 at any point in repository history. An implementation which checks if the file was in the given directory's history will solve this issue.
However, I found that the patch index version was as slow(and sometimes slower) as the current version for src of screened. I suggest that we either:
I have also tested the correlation when various options are passed. I yet have to find a case where a patch-index command gives a different output when compared with the current command (when applied on a file).
For the next week, I plan to get the code up to mid term inspection. My mentors gave me the following criteria:
Implementation of directory support in changes
Patch index changes uses patch index to filter out the unrelated patches of the repository. A patch that does not modify any selected file gets filtered out. A file will be selected if it had a path that is a subpath of the given directory at any point in the repository history.
Tests on correlation:
I have tested for correlation on changes with files using the below script. I ran the script on darcs screened repository, and found that it succeeded on all files. A similar script for annotate has also succeeded.
Changes on directories fails to give the same output, with a simple example given below: In the above example, the patch index version fails to give the middle two patches. This is so because the file a was never under dir2 at any point in repository history. An implementation which checks if the file was in the given directory's history will solve this issue.
However, I found that the patch index version was as slow(and sometimes slower) as the current version for src of screened. I suggest that we either:
- Use patch index only on small directories, and fix the above bug
- Change implementation of patch index, so that it directly stores the relevant patches of a directory
I have also tested the correlation when various options are passed. I yet have to find a case where a patch-index command gives a different output when compared with the current command (when applied on a file).
For the next week, I plan to get the code up to mid term inspection. My mentors gave me the following criteria:
- that it does what is intended
- that it supports all of the options
- that the code itself is of push-to-mainline quality
- and there are adequate tests
- implementing --patch-index and --no-patch-index for all relevant commands
- fixing a bug where patch index was assumed to exist when loading patch index
- some refactors
- more tests
No comments:
Post a Comment