File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -427,15 +427,24 @@ int Main(int argc, char** argv)
427427 }
428428
429429 // Check if all changelists appear only once
430- std::set<std::string> uniqueChangeListNumbers;
431- for (const ChangeList& cl : changes)
432430 {
433- uniqueChangeListNumbers.insert (cl.number );
434- }
435- if (uniqueChangeListNumbers.size () != changes.size ())
436- {
437- ERR (" Changelists appear more than once. Exiting." );
438- return 1 ;
431+ std::set<std::string> uniqueChangeListNumbers;
432+ std::set<std::string> notUniqueChangeListNumbers;
433+ for (const ChangeList& cl : changes)
434+ {
435+ if (!uniqueChangeListNumbers.insert (cl.number ).second )
436+ {
437+ notUniqueChangeListNumbers.insert (cl.number );
438+ }
439+ }
440+ if (!notUniqueChangeListNumbers.empty ())
441+ {
442+ ERR (" Changelists appear more than once. Exiting." );
443+ for (const auto & cl : notUniqueChangeListNumbers)
444+ {
445+ ERR (" Duplicate changelist: " << cl);
446+ }
447+ }
439448 }
440449
441450 // Return early if we have no work to do
You can’t perform that action at this time.
0 commit comments