[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Root directory name in inventory
From: |
Nathaniel Smith |
Subject: |
[Monotone-devel] Root directory name in inventory |
Date: |
Mon, 24 Sep 2007 21:33:35 -0700 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
I just stumbled across this code in CMD_AUTOMATE(inventory):
if (i->first.as_internal() == "")
{
// This is the workspace root directory; print a nicer name.
st.push_str_pair(syms::path, ".");
}
else
{
// Not the root directory
st.push_file_pair(syms::path, i->first);
}
While I'm generally sympathetic to the idea of presenting the root
directory in some more user-friendly name, it seems a bit odd to have
an ad hoc user-friendly of writing it in a non-user-friendly
interface. Especially since it will still need special-case handling
by consumers of the API (no other directory name starts with ".", for
instance), it isn't needed to make things parseable (since basic_io is
quoted, empty strings are perfectly easy to represent), and it
actually makes inventory inconsistent with the rest of the automate
API (I'm thinking in particular of things like 'automate get_revision'
and 'automate get_manifest_of').
Does anyone want to defend this, or should we just axe it?
-- Nathaniel
--
Eternity is very long, especially towards the end.
-- Woody Allen
- [Monotone-devel] Root directory name in inventory,
Nathaniel Smith <=