? |
Reimplemented from Awk.
Definition at line 2107 of file cmt_cvs.cxx.
References CvsImplementation::checkout_package(), cmt_string::find(), History::install(), History::instance(), History::is_installed(), m_cvs, cmt_string::npos, cmt_vector< cmt_string >::size(), and CmtSystem::split().
02108 {
02109
02110
02111
02118 History& h = History::instance ();
02119
02120 if (h.is_installed (line)) return;
02121
02122 h.install (line);
02123
02124 CmtSystem::cmt_string_vector words;
02125
02126 CmtSystem::split (line, " \t", words);
02127
02128 enum
02129 {
02130 need_package,
02131 need_version,
02132 need_path,
02133 no_need
02134 } state = need_package;
02135
02136 cmt_string package;
02137 cmt_string version;
02138 cmt_string path;
02139
02140 for (int i = 1; i < words.size (); i++)
02141 {
02142 const cmt_string& s = words[i];
02143
02144 if (s[0] == '-') continue;
02145
02146 switch (state)
02147 {
02148 case need_package:
02149 package = s;
02150 state = need_version;
02151 break;
02152 case need_version:
02153 version = s;
02154 state = need_path;
02155 break;
02156 case need_path:
02157 path = s;
02158 state = no_need;
02159 break;
02160 }
02161 }
02162
02163 if (version.find ("*") != cmt_string::npos)
02164 {
02165
02166
02167
02168
02169
02170 }
02171 else
02172 {
02173 m_cvs.checkout_package (path, package, version);
02174 }
02175 }
|