On Thu, Sep 24, 2009 at 1:12 AM, Stephen Leake <[email protected]> wrote: > Stephen Leake <[email protected]> writes: >> Zack Weinberg <[email protected]> writes: >>> Closely related question: what the hell is going on with >>> new_optimal_path? >> >> system_path constructors assume the input path is relative to the >> original process directory. But I needed a path that is relative to >> the workspace root, when reading from a stored conflicts file.
Okay, but you could have added a system_path constructor that operated relative to the workspace root, couldn't you have? > I remembered the rest of the reason. If the user provides a relative > path in a conflict file, then I want to write out that same relative > path when I update the conflict file. Why? What's wrong with writing it back out as an absolute path? But you could, again, add an as_external_relative_to_ws_root() method to system_path. > So I need as_external() to dispatch on the path type when writing a > path to a conflict file. The thing is, the paths classes are really, really not supposed to be used with dynamic typing. new_optimal_path introduces a hole through which horrible bugs could crawl (like, the conflicts file somehow getting added to a roster). zw _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
