Re: PATCH: Perform multi-file operations in sorted order
Greg Hudson <ghudson <at> MIT.EDU>
2004-06-01 02:51:21 GMT
On Mon, 2004-05-31 at 18:34, Julian Foad wrote:
> I have as yet failed to get the hardest part working, which is sorting
> the combination of local and repository information for "svn diff
> -rX[:Y]" and "svn status --show-updates". The crux of this seems to
> be sorting the various add/change/delete operations within
> subversion/libsvn_repos/reporter.c (delta_dirs), but when I try to do
> that various things fail. It may be theoretically impossible but I do
> not yet see any reason why. I may try that again and/or request help
> on it later, but, even without it, having local operations sorted
> seems very nice to me.
Well, it's possible, but it's not easy, so I'm not sure if it's worth
it. There are two big cans of worms:
#1: Instead of traversing the report information followed by the
target information followed by the source information, we have to
traverse the (sorted) source and target information at the same time as
the report (asking, at each step, which comes next lexically: a source
item, a target item, or a report item). And we have to behave correctly
if the client's report isn't sorted (because the report could have come
from a 1.0 client). (By "correctly" I mean we have to display all the
right output, but not necessarily in alphabetical order.)
#2: Frequently, on the libsvn_wc side of things, the editor's
close_directory() handler will process everything the server didn't
mention. For instance, "svn st -u" will (I presume) report on status
actions received from the server and then, when the directory is closed,
report on locally modified or added files not mentioned by the server
(and also recurse into subdirectories not mentioned by the server). All
these editors would have to be changed to, each time the server mentions
(Continue reading)