darcs

Issue 2207 Annotate on directories fails

Title Annotate on directories fails
Priority Status resolved
Milestone Resolved in
Superseder Nosy List bsrkaditya, kowey
Assigned To bsrkaditya
Topics

Created on 2012-07-08.07:56:09 by bsrkaditya, last changed 2012-08-26.16:57:09 by bsrkaditya.

Files
File name Uploaded Type Edit Remove
add-test-for-issue2207.dpatch bsrkaditya, 2012-07-08.08:00:18 application/octet-stream
resolve.dpatch bsrkaditya, 2012-07-08.08:13:37 application/octet-stream
Messages
msg15855 (view) Author: bsrkaditya Date: 2012-07-08.07:56:08
1. Summarise the issue (what were doing, what went wrong?)
 Annotate on directories prints unknown as the corresponding patch of a
file, in certain cases. 
2. What behaviour were you expecting instead?
 Annotate is to give the last patch that modified the file in the directory.
3. What darcs version are you using? (Try: darcs --exact-version)
 darcs 2.8.0
4. What operating system are you running?
  ubuntu 12.04
msg15856 (view) Author: bsrkaditya Date: 2012-07-08.08:00:18
Sample test case added.
Attachments
msg15857 (view) Author: bsrkaditya Date: 2012-07-08.08:13:37
Bug fix.
Attachments
msg15860 (view) Author: owst Date: 2012-07-10.10:10:28
bsrkaditya, if you `darcs send` the patches (with a patchname "resolve
issue2207") the tracker will pick them up, and assign them to the relevant
issues.

> [Fix issue2207: Annotate on directories
> ...
> -       else return $ (seal $ newset2RL r, recorded, toFilePath origpath)
> +       else return $ (seal $ newset2RL r, recorded, "./" ++
toFilePath origpath)
> ...
> -        A.annotateDirectory (invertRL patches) (fp2fn $ "./" ++ path)
subs
> +        A.annotateDirectory (invertRL patches) (fp2fn path) subs
> ...
> -                        putStrLn $ fmt con $ A.annotate (invertRL
patches) (fp2fn $ "./" ++ path) con
> +                        putStrLn $ fmt con $ A.annotate (invertRL
patches) (fp2fn path) con

I feel dubious about these ("./" ++) applications; is this sort of thing not
centralised in some path-sanitising code? If not, perhaps it should be...
History
Date User Action Args
2012-07-08 07:56:09bsrkadityacreate
2012-07-08 08:00:19bsrkadityasetfiles: + add-test-for-issue2207.dpatch
messages: + msg15856
2012-07-08 08:13:38bsrkadityasetfiles: + resolve.dpatch
messages: + msg15857
2012-07-10 10:10:30owstsetmessages: + msg15860
2012-08-26 16:57:09bsrkadityasetstatus: unknown -> resolved