darcs

Patch 882 resolve issue2207: fix annotate on directories

Title resolve issue2207: fix annotate on directories
Superseder Nosy List bsrkaditya
Related Issues
Status accepted Assigned To bsrkaditya
Milestone

Created on 2012-07-16.21:44:58 by bsrkaditya, last changed 2012-07-21.15:25:26 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
fix-annotate-on-directories.dpatch bsrkaditya, 2012-07-16.21:44:57 application/octet-stream
fix-annotate-on-directories.dpatch bsrkaditya, 2012-07-21.14:41:47 application/octet-stream
See mailing list archives for discussion on individual patches.
Messages
msg15876 (view) Author: bsrkaditya Date: 2012-07-16.21:44:57
The following patch has the bug fix for annotate on directories,
with an accompaniying test.

The problem is caused by the lack of "./" in the FileName's
of subs.

After applying this patch, darcs gives a different output
for two files in screened (when applied on tests directory).

They are issue1248.sh, and issue1446.sh

However, the output still conforms to the description in
the manual. This is due to the ambiguty caused by multiple
files having the same path.
Attachments
msg15900 (view) Author: owst Date: 2012-07-21.09:23:15
I'm still not happy about the number of occurences of 
  "./" ++
in this file (I know you've only added one, but it'd be good to fix
paths in one place).

I can see 3 occurences in Annotate.hs. Maybe you could use the "fix"
function in src/Darcs/Patch/TouchesFiles.hs (perhaps moving that
function to a more suitable Module). Our goal is to improve the Darcs'
codebase when we can - this is a good chance! 

A more invasive change would be to create a new datatype, where the
constructors determine whether or not a leading "./" has been added.
That way, GHC can catch if we try to apply a function expecting "./"s to
a plain relative filepath. 

The test looks ok, the grep is perhaps a bit vague, but it'll probably do.
msg15901 (view) Author: bsrkaditya Date: 2012-07-21.14:41:47
I made a followup as per owst's suggestion(Collect all "./" ++ 
applications to one place)
Attachments
msg15903 (view) Author: owst Date: 2012-07-21.15:01:02
This looks better now, accepting. Thanks!
msg15906 (view) Author: darcswatch Date: 2012-07-21.15:25:23
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-2da58800bf02b05aad183013ef2ec376da84f3e3
msg15907 (view) Author: darcswatch Date: 2012-07-21.15:25:24
This patch bundle (with 2 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-9c0f827843fbda3d9adfed2fd0096875a076f07c
msg15908 (view) Author: darcswatch Date: 2012-07-21.15:25:26
This patch bundle (with 2 patches) was just applied to the repository http://darcs.net/screened.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_screened.html#bundle-9c0f827843fbda3d9adfed2fd0096875a076f07c
History
Date User Action Args
2012-07-16 21:44:58bsrkadityacreate
2012-07-16 21:45:48darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-2da58800bf02b05aad183013ef2ec376da84f3e3
2012-07-17 16:19:47bsrkadityasetstatus: needs-screening -> needs-review
2012-07-20 17:02:25koweysetstatus: needs-review -> needs-screening
2012-07-21 09:23:16owstsetmessages: + msg15900
2012-07-21 14:41:47bsrkadityasetfiles: + fix-annotate-on-directories.dpatch
messages: + msg15901
2012-07-21 14:42:27darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-2da58800bf02b05aad183013ef2ec376da84f3e3 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-9c0f827843fbda3d9adfed2fd0096875a076f07c
2012-07-21 15:01:02owstsetstatus: needs-screening -> accepted
messages: + msg15903
2012-07-21 15:25:23darcswatchsetmessages: + msg15906
2012-07-21 15:25:24darcswatchsetmessages: + msg15907
2012-07-21 15:25:26darcswatchsetmessages: + msg15908