Initial work on workspace folder state visualization

FossilOrigin-Name: a2d5250064d0499d5ceea87b5eadaa8b90057ba8
This commit is contained in:
kostas
2015-07-10 19:52:55 +00:00
parent 0191b4ba5b
commit a953856ea7
5 changed files with 65 additions and 14 deletions

View File

@@ -22,6 +22,7 @@ void Workspace::clearState()
getFiles().clear();
getPaths().clear();
getPathState().clear();
stashMap.clear();
branchList.clear();
tags.clear();
@@ -278,6 +279,14 @@ void Workspace::scanWorkspace(bool scanLocal, bool scanIgnored, bool scanModifie
QString path = rf->getPath();
getPaths().insert(path);
// Add or merge file state into directory state
pathstate_map_t::iterator state_it = getPathState().find(path);
if(state_it != getPathState().end())
state_it.value() = static_cast<WorkspaceFile::Type>(state_it.value() | type);
else
getPathState().insert(path, type);
}
// Check if the repository needs integration