[darcs-users] [patch267] Accept issue1860: (Un)applying move patc... (and 2 more)
Eric Kow
kowey at darcs.net
Sun Jun 6 18:32:18 UTC 2010
On Sun, Jun 06, 2010 at 17:02:26 +0100, Eric Kow wrote:
> > Sun Jun 6 16:21:25 CEST 2010 Petr Rockai <me at mornfall.net>
> > +renameChanged from to = modify $ \st -> st { changed = rename' $ changed st }
> > + where rename' = S.fromList . map renameone . S.toList
There's S.map if you're interested.
> > + renameone x | from `isPrefix` x = to `catPaths` relative from x
> > + | otherwise = x
> > + relative (AnchoredPath from) (AnchoredPath x) = AnchoredPath $ drop (length from) x
> Do we have to worry about things like initial/trailing slashes in from
> and x?
Also, will this do the right thing if from is something like "foo" and x
is something like "foobar"?
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100606/2ad0fe0e/attachment.pgp>
More information about the darcs-users
mailing list