This was a necessary step before I could even start to make any farther
reaching changes to the Darcs.Repository API. I fixed a number of bugs
along the way, mostly to do with --look-for-moves and
--look-for-replaces, which are now more cleanly integrated. The number
of patches in this bundle is large but I tried hard to keep each change
small and reviewable.
If one looks a bit closer, the beginnings of a better API can be
spotted. I refactored (mostly internally in D.R.State, for now) things
so that when we read a piece of state, we don't throw it away. Instead
we pass it (or a modified version) on to the caller, who is free to
discard the unneeded parts, but more often than not can directly use it
in stead of re-computing it. I'll write more about that in another message.
I am not yet screening this because about half the patches conflict with
Patch1593 (separating display and storage of patches), and I would like
to rebase them if (and when) Patch1593 gets screened.
TL;DR: Accepted, all tests pass, thanks for splitting changes into small
* use restrictDarcsdir in D.R.State.readWorking
* fixed erroneous/misleading docs in D.R.State
* small simplification in filteredWorking
* better documentation for restrictBoring
* removed unneeded forall in type signatures in D.R.State
* yet another layout fix, for D.R.State.readPending
* pull all the lookForMoves/Replaces ugliness into D.R.State
Nice improvement of the repository API.
This simplifies the code of the individual commands
that inspect the unrecorded state.
* layout changes, mostly to break overlong lines
* document how readPendingAndWorking handles LookForMoves and
* slightly refactored index code in D.R.State
* further improved docs for unrecordedChanges
* pull calls to GetMoves and GetReplaces into readPendingAndWorking
* layout cleanup and some renamings in D.R.State
* avoid repeated reading of the pending tree in D.R.State.getReplaces
* maybeRestrictSubpaths gets the pending patch as parameter
OK (Probably the comment "- we have no need for the pending patch"
should go away)
(PD: the next patch removes it :-) )
* fix: consider --look-for-moves in readUnrecordedFiltered and
* avoid use of pattern type signatures in readPendingAndWorking
* layout: decreased indentation of where-block of D.R.State.getReplaces
* fix getReplaces, refactoring call sites along the way
*Seems* correct to me.
* fix: use argument file paths to restrict detected moves
* added a test for --look-for-moves and --look-for-replaces and with files
* removed tests/failing-look_for_replaces2.sh
* cleanup arguments to filteredWorking
* fixed tests/failing-look_for_replaces1.sh so that it fails for the
* added test for --look-for-moves with (file path) arguments
This is to test patch "fix: use argument file paths to restrict detected