Commits

Anonymous committed a736f95

* All commands now also set $hg in the constructor so option functions such as excluding() may access the hg executable's capabilities.

This may make setting $hg in execute() unneccessary.

Comments (0)

Files changed (8)

Trunk/VersionControl/Hg/Command/Archive.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
+        $this->hg = $hg;
+
         /* should always be called so we have a full array of valid options */
         $this->setOptions(array()); //should be renamed as joinPossibleOptions()
 

Trunk/VersionControl/Hg/Command/Cat.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
         $this->hg = $hg;
 
         /* should always be called so we have a full array of valid options */

Trunk/VersionControl/Hg/Command/Clone.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
         $this->hg = $hg;
 
         /* check if a repository has been designated already or not */

Trunk/VersionControl/Hg/Command/Init.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
         $this->hg = $hg;
 
         /* check if a repository has been designated already or not */

Trunk/VersionControl/Hg/Command/Log.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
+        $this->hg = $hg;
+
         /* should always be called so we have a full array of valid options */
         $this->setOptions($params);
 

Trunk/VersionControl/Hg/Command/Pull.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
         $this->hg = $hg;
+
         /* a repository must have been set already */
         $repository = $this->hg->repository->getPath();
         if ( empty($repository) ) {

Trunk/VersionControl/Hg/Command/Status.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
+        $this->hg = $hg;
+
         /* should always be called so we have a full array of valid options */
         $this->setOptions($params);
     }

Trunk/VersionControl/Hg/Command/Version.php

      */
     public function __construct($params = null, VersionControl_Hg $hg)
     {
+        /* Make $hg available to option methods */
         $this->hg = $hg;
 
         /* should always be called so we have a full array of valid options */