# HG changeset patch # User Chris Cannam # Date 1291379397 0 # Node ID 087d7cdde662566cadd75c8848c85f14f9958617 # Parent 006630304b69332500e7f4e107490f5f9625562c * Add InConflict state (not yet used) diff -r 006630304b69 -r 087d7cdde662 filestates.cpp --- a/filestates.cpp Fri Dec 03 12:29:24 2010 +0000 +++ b/filestates.cpp Fri Dec 03 12:29:57 2010 +0000 @@ -31,11 +31,19 @@ m_added.clear(); m_removed.clear(); m_missing.clear(); + m_inConflict.clear(); m_unknown.clear(); } FileStates::State FileStates::charToState(QChar c, bool *ok) { + // Note that InConflict does not correspond to a stat char -- it's + // reported separately, by resolve --list -- stat reports files in + // conflict as M which means they will appear in more than one bin + // if we handle them naively. + + //!!! -- but InConflict isn't actually handled elsewhere, it's + //!!! -- only a placeholder really at the moment if (ok) *ok = true; if (c == 'M') return Modified; if (c == 'A') return Added; @@ -56,6 +64,7 @@ case Unknown: return &m_unknown; case Removed: return &m_removed; case Missing: return &m_missing; + case InConflict: return &m_inConflict; } } @@ -85,8 +94,9 @@ } DEBUG << "FileStates: " << m_modified.size() << " modified, " << m_added.size() - << " added, " << m_removed.size() << " removed, " << m_missing.size() - << " missing, " << m_unknown.size() << " unknown" << endl; + << " added, " << m_removed.size() << " removed, " << m_missing.size() + << " missing, " << m_inConflict.size() << " in conflict, " + << m_unknown.size() << " unknown" << endl; } QStringList FileStates::getFilesInState(State s) const diff -r 006630304b69 -r 087d7cdde662 filestates.h --- a/filestates.h Fri Dec 03 12:29:24 2010 +0000 +++ b/filestates.h Fri Dec 03 12:29:57 2010 +0000 @@ -35,9 +35,10 @@ Unknown, Removed, Missing, + InConflict FirstState = Clean, - LastState = Missing + LastState = InConflict }; void parseStates(QString text); @@ -51,6 +52,7 @@ QStringList unknown() const { return m_unknown; } QStringList removed() const { return m_removed; } QStringList missing() const { return m_missing; } + QStringList inConflict() const { return m_inConflict; } State getStateOfFile(QString file) const; @@ -60,6 +62,7 @@ QStringList m_unknown; QStringList m_removed; QStringList m_missing; + QStringList m_inConflict; QMap m_stateMap; State charToState(QChar, bool * = 0);