[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] "" is invalid file_path?
From: |
Stephen Leake |
Subject: |
[Monotone-devel] "" is invalid file_path? |
Date: |
Mon, 08 Sep 2008 03:59:30 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) |
As part of the conflict resolution work, I need to parse the output of
'automate show_conflicts'.
For a missing root, a typical output is:
conflict missing_root
left_type "pivoted root"
ancestor_name "foo"
right_type "deleted directory"
ancestor_name "foo"
conflict orphaned_directory
right_type "deleted directory"
ancestor_name ""
left_type "renamed directory"
ancestor_name ""
left_name "bar"
The 'ancestor_name' lines in the second stanza are the names of the
root directories in the left and right parent revisions. I'm not clear
that they can ever be other than ""; more on that later.
Part of parsing this requires turning the file name string into a
file_path object. However, the file_path_as_external constructor
complains that "" is an invalid path. This is from this line in
normalize_external_path:
N(!path.empty(), F("empty path '%s' is invalid") % path);
However, fully_normalized_path has this:
// empty path is fine
if (path.empty())
return true;
What is the rationale for normalize_external_path rejecting ""?
One fix is to delete that line from normalize_external_path.
If the ancestor_name line can never be other than "", another fix is
to delete those lines from the show_conflicts output; they are not
useful. But then "" may show up elsewhere, so I prefer the first fix.
--
-- Stephe
- [Monotone-devel] "" is invalid file_path?,
Stephen Leake <=