Hello,

In drush command it would be nice to have --all options. Such as drush csta --all, csto --all, cimp --all, cexp --all, crev --all. We kind of need this so we can track everything from beginning of project.

Also I find it easier just list all identifier existed rather than typing drush cgi component name.

I'll post a suggestion patch for it

Comments

neoxavier’s picture

Hello here is the patch,

now csta, csto, cimp, cexp, crev drush command has --all option

I also have new command called clist,
I probably will put sync info in clist, but I have not seen the callback function

dagmar’s picture

Status: Active » Needs work

Hi! Thanks for this patch, here is a bit of feedback.

+++ b/configuration.drush.inc
@@ -120,28 +126,89 @@ function configuration_drush_command() {
+  $items['config-list'] = array(
+    'callback' => '_configuration_list',
+    'description' => 'Return the list of components and identifiers',
+    'aliases' => array('clist'),
+    'examples' => array(
+      'drush list' => 'Return the list of components and identifiers',
+    ),
+    'arguments' => array(),
+  );

Would be nice to have two options for this command. One to display only the tracked configurations, and other to display non tracked configurations.

+++ b/configuration.drush.inc
@@ -120,28 +126,89 @@ function configuration_drush_command() {
+    $formated[] =  $component['machine_name'].".".$component['identifier'];

This line is not following the coding standards.

+++ b/configuration.drush.inc
@@ -120,28 +126,89 @@ function configuration_drush_command() {
+  $header = array();
+  $header[] = array(
+    'Component::Name',
+    'Component::Machine Name',
+    'Identifier',
+  );
+  $content = _get_component_and_identifier();
+  $table = array_merge($header, $content);
+  drush_print_table($table, TRUE);

We could display if the configuration is or is not being tracked in another column.

+++ b/configuration.drush.inc
@@ -167,12 +234,17 @@ function _configuration_get_components() {
+  if ($export_all) {
+  $args = _components_indentifier_formater();
+  }
+  else {

This and the other ifs are not following the coding standards.

neoxavier’s picture

Hello,

thanks for the feedback, can you poin me where can I get the component object? so I can use getStatus function

neoxavier’s picture

ignore this patch, this is not clean

neoxavier’s picture

cleaner patch.

I decide not to put status in clist at the moment as I've put status in cgt drush command (http://drupal.org/node/1808450). But I will add the status after both patch has been commited. It will be easier for me to build up from that.

neoxavier’s picture

sorry forget the patch

dagmar’s picture

Status: Needs work » Needs review
gdrupal’s picture

Status: Needs review » Reviewed & tested by the community

@neoxavier this patch looks RTBC for me... not coding standard issues so far... I tested manually all commands, double checking its results in the UI too.... looooooking good

gdrupal’s picture

Status: Reviewed & tested by the community » Needs work

@neoxavier There is a few indent missing in lines after the "if" Coder was missing that... I use mostly NB to format my code following this... http://drupal.org/node/1019816 if that could be a help for you.

neoxavier’s picture

Hello,

thanks for the feedback
actually I use NB plug in as well. Dunno why it happened. Maybe because I fix it during lunch
here is the identation fix

dagmar’s picture

+++ b/configuration.drush.inc
@@ -117,31 +127,96 @@ function configuration_drush_command() {
+    if (!empty($component['identifier'])) {
+    $formated[] =  $component['machine_name'] . "." . $component['identifier'];
+    }

You forgot this :)

Also, remember to change the status to "Needs Review" when you provide a new patch.

neoxavier’s picture

Assigned: Unassigned » neoxavier
Status: Needs work » Needs review
StatusFileSize
new9.19 KB

Hello,

ah ya, after midnight fix..
thank you for reminding me..

here is the new patch

gdrupal’s picture

Status: Needs review » Reviewed & tested by the community

Now it looks RTBC

dagmar’s picture

Status: Reviewed & tested by the community » Fixed

Awesome! Committed: 690e7ee

I created a Follow up for this issue: #1809908: drush ctso --all doesn't display the right number of untracked configurations

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.