[darcs-users] [patch267] Accept issue1860: (Un)applying move patc... (and 2 more)
Eric Kow
kowey at darcs.net
Sun Jun 6 16:02:27 UTC 2010
> 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
> + renameone x | from `isPrefix` x = to `catPaths` relative from x
> + | otherwise = x
> + relative (AnchoredPath from) (AnchoredPath x) = AnchoredPath $ drop (length from) x
Just a quick comment here (without having read the patch properly).
Do we have to worry about things like initial/trailing slashes in from
and x?
If I understand correctly AnchoredPath is for paths relative to the tree
root?
> unless (isNothing item) $ do
> modifyItem from Nothing
> modifyItem to item
> + renameChanged from to
One would have to know more about hashed-storage to see if this makes
sense.
>
> Sun Jun 6 16:28:58 CEST 2010 Petr Rockai <me at mornfall.net>
> * Accept issue1860: (Un)applying move patches may lead to incomplete pristine.
Accept issue1860: (Un)applying move patches may lead to incomplete pristine.
----------------------------------------------------------------------------
I'll apply this one straightaway
> hunk ./tests/failing-issue1860-incomplete-pristine.sh 1
> +#!/usr/bin/env bash
> +## Copyright (C) 2010 Petr Rockai
So for some reason, our EXAMPLE.sh file has a request to name the issue
and give a synopsis at the top of the file. I'm sure Trent had a good
reason for it, but no feelings either way. The important thing is that
we get the job done.
(and the licensing stuff below helps).
> +. lib # Load some portability helpers.
> +rm -rf R S # Another script may have left a mess.
> +darcs init --repo R # Create our test repos.
> +
> +cd R
> +mkdir tools
> +darcs rec -lam "add tools"
> +mkdir tools/cgi
> +echo bar > tools/cgi/README
> +darcs rec -lam "add cgi"
> +darcs move tools contrib
> +darcs rec -lam "rename tools/ to contrib/"
> +rm -rf contrib/cgi
> +darcs rec -lam "drop cgi"
> +cd ..
> +
> +darcs get R S
> +cd S
> +darcs show pristine
> +darcs unpull --last 2 -a
> +darcs show pristine
> +cd ..
Looks good. Maybe boiling it down further (anonymising the names,
patches etc) would have been nice, but it doesn't make a difference.
--
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/0d7f37fd/attachment.pgp>
More information about the darcs-users
mailing list