All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 1/4] mg-allocate: Use ^ for deallocation, not !
Date: Thu, 3 May 2018 15:58:12 +0100	[thread overview]
Message-ID: <1525359495-30844-2-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1525359495-30844-1-git-send-email-ian.jackson@eu.citrix.com>

! is annoying because some shells enable !-history expantion by
default even though few users have any idea about it.  In general users
are confused by the error message and do not know what to do next.

We still honour ! for the benefit of old wrapper scripts, finger
macros, etc.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 README.dev              | 4 ++--
 mg-allocate             | 8 ++++----
 mg-schema-test-database | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/README.dev b/README.dev
index 95fc66c..5787bd8 100644
--- a/README.dev
+++ b/README.dev
@@ -13,10 +13,10 @@ e.g.
 $ ./mg-hosts manual-task-create ianc@kazak
 
 Borrow, estimating 1 day duration (for the planner):
-$ ./mg-allocate -U 1d marilith-n5 
+$ ./mg-allocate -U 1d marilith-n5
 
 Return (not automatic, even with an estimate given):
-$ ./mg-allocate \!marilith-n5 
+$ ./mg-allocate ^marilith-n5
 
 Removing machines for servicing/outage
 ======================================
diff --git a/mg-allocate b/mg-allocate
index c30dd15..087b14b 100755
--- a/mg-allocate
+++ b/mg-allocate
@@ -5,11 +5,11 @@
 #  ./mg-allocate [-l] [-l] [-l]
 #
 # <resource-spec> syntax:
-#   [!][<type>/]<name>[/<share>]      type defaults to 'host'
+#   [^][<type>/]<name>[/<share>]      type defaults to 'host'
 #                                     type=='S' means 'shared-host'
 #                                     type=='F' means 'shared-flight'
 #                                     share defaults to *
-#                                     "!" prefix means deallocate
+#                                     "^" prefix (or "!") means deallocate
 #                                     name=option|option|... means
 #                                       any one of those options
 #                                     option={flag,flag...} means anything
@@ -38,7 +38,7 @@
 #                  be owned by the current task (or perhaps by a task
 #                  named in --steal).
 #
-#                  Not compatible with the !<resource> deallocation
+#                  Not compatible with the ^<resource> deallocation
 #                  syntax: donation implies deallocation, in a sense.
 #
 #   --steal <task-spec>
@@ -125,7 +125,7 @@ END
 sub parse_1res ($) {
     my ($res) = @_;
 
-    $res =~ m,^(\!?) (?: ([^/]+)/ )? ([^/]+) (?: /(\d+|\*) )?$,x
+    $res =~ m,^([!^]?) (?: ([^/]+)/ )? ([^/]+) (?: /(\d+|\*) )?$,x
         or die "bad resource $res ?";
     my $allocate= !$1;
     my $restype= defined($2) ? $2 : 'host';
diff --git a/mg-schema-test-database b/mg-schema-test-database
index 641aadb..6aeedd1 100755
--- a/mg-schema-test-database
+++ b/mg-schema-test-database
@@ -71,7 +71,7 @@
 #    ./mg-schema-test-database drop [_SUFFIX]
 #   This will throw away all of the information in the test DB.
 #
-#  5. OSSTEST_TASK=iwj@testing ./mg-allocate !a-host
+#  5. OSSTEST_TASK=iwj@testing ./mg-allocate ^a-host
 #   Hosts that were marked in the main DB as borrowed, are returned by
 #   mg-schema-test-database to the main DB task that previously owned
 #   them, but not freed.  So you need to explicitly free them.
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-05-03 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 14:58 [OSSTEST PATCH 0/4] Use ^ for negation, not ! Ian Jackson
2018-05-03 14:58 ` Ian Jackson [this message]
2018-05-03 14:58 ` [OSSTEST PATCH 2/4] mg-hosts: Use ^ for flag " Ian Jackson
2018-05-03 14:58 ` [OSSTEST PATCH 3/4] mg-adjust-flight-makexrefs: Use ^ for excluding jobs, " Ian Jackson
2018-05-03 14:58 ` [OSSTEST PATCH 4/4] Standalone HostFlags: Use ^ for negation, " Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1525359495-30844-2-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.