summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-01-29 15:33:34 +0900
committerKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-01-29 15:57:03 +0900
commit9c432b82dd0a450555eff122d448fa4976b2d2b1 (patch)
treee263e868c58a417fcddc5c59f25b6c042b81e100
parentf9d68b98e7bc7181eb0680b54e679c8708e950dd (diff)
find.py: add -b option to search BSP
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-rw-r--r--README.md3
-rwxr-xr-xscripts/find.py22
2 files changed, 17 insertions, 8 deletions
diff --git a/README.md b/README.md
index 65d74a7..9132ec5 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,7 @@ You need to have **.config** file. You can copy sample .config, and edit it
- ject -s Active ... # single match
- ject -s Active,New ... # multi match
- ject -ns Done # not match
+ - ject -is -b bsp39x # bsp39x from all tasks
* -a : show matched assignee task
* -as : show unmatched assignee task
- ject -a Wolfram ...
@@ -49,6 +50,8 @@ You need to have **.config** file. You can copy sample .config, and edit it
* -at : show unmatched team task
- ject -t IO,MM ...
- ject -nt Core ...
+* -b : show BSP commits
+ - ject -b bsp39x ...
* -f : show with file name
* -r : show with relationships
* --oneline : show one line
diff --git a/scripts/find.py b/scripts/find.py
index e0f6558..d5060cd 100755
--- a/scripts/find.py
+++ b/scripts/find.py
@@ -47,7 +47,7 @@ class find(base.base):
#--------------------
# parse_option
#--------------------
- def parse_option(self, arg, option, char, hit):
+ def parse_option(self, arg, option, tag, hit):
op = "-l" # hit
if (not hit):
@@ -58,13 +58,17 @@ class find(base.base):
if (cmd == option):
match = 1
elif (match):
- # Wolfram,Shimoda
- # ->
- # (Wolfram|Shimoda)
- tgt = "({})".format(cmd.replace(",", "|"))
-
- self.files = self.run("echo \"{}\" | xargs egrep {} \"{}:\s+{}\"".\
- format(self.files, op, char, tgt))
+ if (option == "-b"):
+ tag = cmd
+ tgt = ""
+ else:
+ # Wolfram,Shimoda
+ # ->
+ # (Wolfram|Shimoda)
+ tgt = "\s+({})".format(cmd.replace(",", "|"))
+
+ self.files = self.run("echo \"{}\" | xargs egrep {} \"{}:{}\"".\
+ format(self.files, op, tag, tgt))
return
#--------------------
@@ -118,6 +122,7 @@ class find(base.base):
# -na : not matched assignee
# -t : matched team
# -nt : not matched team
+ # -b : bsp
if (self.files):
self.parse_option(arg, "-s", "status", 1)
self.parse_option(arg, "-ns", "status", 0)
@@ -125,6 +130,7 @@ class find(base.base):
self.parse_option(arg, "-na", "assignee", 0)
self.parse_option(arg, "-t", "team", 1)
self.parse_option(arg, "-nt", "team", 0)
+ self.parse_option(arg, "-b", None, 1)
#--------------------
# get