Index: /CMT/HEAD/ChangeLog
===================================================================
--- /CMT/HEAD/ChangeLog	(revision 540)
+++ /CMT/HEAD/ChangeLog	(revision 541)
@@ -1,2 +1,14 @@
+2010-04-02    <rybkin@lal.in2p3.fr> 428
+
+	* mgr/requirements: Introduce cmt_parallel_bins tag to enable locking
+	mechanism which allows for simultaneous/parallel builds for multiple binary
+	tags (not activated by default)
+	* source/cmt_commands.cxx: Introduce optional arguments [<path>]... for
+	"cmt show container" command
+	* source/cmt_parser.cxx: Implement introduced additional functionality of
+	"cmt show container" command
+	* source/cmt_project.h: idem
+	* source/cmt_project.cxx: idem
+	
 2010-03-31    <rybkin@lal.in2p3.fr> 427
 
Index: /CMT/HEAD/mgr/requirements
===================================================================
--- /CMT/HEAD/mgr/requirements	(revision 540)
+++ /CMT/HEAD/mgr/requirements	(revision 541)
@@ -464,7 +464,7 @@
 
 macro lock_command "" \
-      Linux        "lockfile " \
-      Darwin       "lockfile " \
-      VisualC      "%CMTROOT%\mgr\cmt_lockfile.bat "
+      cmt_parallel_bins&Linux        "lockfile " \
+      cmt_parallel_bins&Darwin       "lockfile " \
+      cmt_parallel_bins&VisualC      "%CMTROOT%\mgr\cmt_lockfile.bat "
 
 macro unlock_command "rm -rf " \   
Index: /CMT/HEAD/source/cmt_commands.cxx
===================================================================
--- /CMT/HEAD/source/cmt_commands.cxx	(revision 540)
+++ /CMT/HEAD/source/cmt_commands.cxx	(revision 541)
@@ -1314,4 +1314,8 @@
       else if (arg == "container")
 	{
+	  if (argc > 0)
+	    {
+	      fill_arguments ();
+	    }
 	  cmt.m_action = action_show_container;
 	}
@@ -2286,5 +2290,5 @@
   help_texts.add () =  "show  constituent_names :  constituent names";
   help_texts.add () =  "show  constituents      :  constituent definitions";
-  help_texts.add () =  "show  container         :  container package of current project";
+  help_texts.add () =  "show  container [<path>]... :  container package of current project [or <path>s projects]";
   help_texts.add () =  "show  cycles            :  cycles in the use graph";
   help_texts.add () =  "show  fragment <name>   :  one fragment definition";
Index: /CMT/HEAD/source/cmt_parser.cxx
===================================================================
--- /CMT/HEAD/source/cmt_parser.cxx	(revision 540)
+++ /CMT/HEAD/source/cmt_parser.cxx	(revision 541)
@@ -4020,7 +4020,26 @@
 
 //----------------------------------------------------------
-void Cmt::do_show_container (const ArgParser& /*ap*/)
-{
-  Project::show_container ();
+void Cmt::do_show_container (const ArgParser& ap)
+{
+  if (ap.arguments.size () == 0)
+    {
+      Project::show_container ();
+    }
+  else
+    {
+      for (int i = 0; i < ap.arguments.size (); i++)
+	{
+	  const cmt_string& path_name = ap.arguments[i];
+	  if (CmtSystem::test_directory (path_name))
+	    {
+	      Project::show_container (path_name);
+	    }
+	  else
+	    {
+	      CmtMessage::warning ("No such directory: " + path_name);
+	      CmtError::set (CmtError::path_not_found, path_name);
+	    }
+	}
+    }
 }
 
Index: /CMT/HEAD/source/cmt_project.cxx
===================================================================
--- /CMT/HEAD/source/cmt_project.cxx	(revision 540)
+++ /CMT/HEAD/source/cmt_project.cxx	(revision 541)
@@ -1281,65 +1281,80 @@
 
 /*----------------------------------------------------------*/
-void Project::show_container ()
-{
-  Project* p = get_current ();
-
-  if (p == 0) return;
+void Project::show_container (const cmt_string& path)
+//void Project::show_container ()
+{
+  Project* p (0);
+  if (path == "")
+    {
+      p = get_current ();
+    }
+  else
+    {
+      p = find_by_cmtpath (find_in_cmt_paths (path));
+    } 
+
+  if (p == 0)
+    {
+      cmt_string msg ("No project found for path "
+		      + (path != "" ? path : (Use::current()).real_path)
+		      );
+      CmtMessage::warning (msg);
+      CmtError::set (CmtError::warning, msg);
+      return;
+    }
   Use* use = &(p->m_container);
-  if (use->get_package_name () == "") return;
-
-          if (!use->located ())
-            {
-	      CmtMessage::warning ("container " + use->get_package_name ()
-				   + " " + use->version + " " + use->path
-				   + " not found");
-	      /*
-              if (!Cmt::get_quiet ())
-                {
-                  cout << "# package " << use->get_package_name () <<
-		    " " << use->version << " " << use->path << 
-		    " not found" <<
-		    endl;
-                }
-	      */
-              CmtError::set (CmtError::package_not_found, use->get_package_name ());
-            }
-          else
-            {
-              static const cmt_string empty;
-              cmt_string p = use->real_path;
-              if (use->path != "")
-                {
-		  int pos = p.find_last_of (use->path);
-		  if (pos != cmt_string::npos)
-		    {
-		      p.erase (pos);
-		    }
-                }
-              
-              cout << "container " << use->get_package_name ()
-		   << " " << use->version;
-
-	      if (CmtSystem::absolute_path (use->path))
-		{
-		  if (!Cmt::get_quiet ()) 
-		    {
-		      cout << " (" << use->path << ")";
-		    }
-		}
-	      else
-		{
-		  cout << " " << use->path;
-		}
-
-              if (!Cmt::get_quiet ()) 
-                {
-                  if (p != "") cout << " (" << p << ")";
-                  if (use->auto_imports == Off) cout << " (no_auto_imports)";
-                }
-
-              cout << endl;
-            }
-}
+  if (use->get_package_name () == "")
+    {
+      cmt_string msg ("No container specified for project " + p->get_name ()
+		      + " (" + p->get_cmtpath () + ")");
+      CmtMessage::warning (msg);
+      CmtError::set (CmtError::warning, msg);
+      return;
+    }
+  
+  if (!use->located ())
+    {
+      CmtMessage::warning ("container " + use->get_info ()
+			   + " not found");
+      CmtError::set (CmtError::package_not_found, use->get_package_name ());
+    }
+  else
+    {
+      static const cmt_string empty;
+      cmt_string p = use->real_path;
+      if (use->path != "")
+	{
+	  int pos = p.find_last_of (use->path);
+	  if (pos != cmt_string::npos)
+	    {
+	      p.erase (pos);
+	    }
+	}
+      
+      cout << "container " << use->get_package_name ()
+	   << " " << use->version;
+      
+      if (CmtSystem::absolute_path (use->path))
+	{
+	  if (!Cmt::get_quiet ()) 
+	    {
+	      cout << " (" << use->path << ")";
+	    }
+	}
+      else
+	{
+	  cout << " " << use->path;
+	}
+      
+      if (!Cmt::get_quiet ()) 
+	{
+	  if (p != "") cout << " (" << p << ")";
+	  if (use->auto_imports == Off) cout << " (no_auto_imports)";
+	}
+      
+      cout << endl;
+    }
+}
+
 /*----------------------------------------------------------*/
 void Project::show_specified_strategies_for_all ()
Index: /CMT/HEAD/source/cmt_project.h
===================================================================
--- /CMT/HEAD/source/cmt_project.h	(revision 540)
+++ /CMT/HEAD/source/cmt_project.h	(revision 541)
@@ -113,5 +113,5 @@
   static void clear_all ();
   static void show_all ();
-  static void show_container ();
+  static void show_container (const cmt_string& path = "");
   static void show_specified_strategies_for_all ();
   static void show_paths (const CmtSystem::cmt_string_vector& arguments);
