Make a nicer looking name for workunit output. Also adds the capability to access the filename. I have wanted access to this in the past.

Review Request #1876 — Created March 6, 2015 and submitted

zundel
pants
zundel/nice-names-task-output
1215
99ea746...
pants-reviews
benjyw, jsirois, patricklaw

Make a nicer looking name for workunit output. Also adds the capability to access the filename. I have wanted access to this in the past.

 src/python/pants/base/workunit.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

The names created for workunit output were cryptic when inspecting filenames manually. I prepended the workunit name to the filename:

Now you can quickly find the output you are interested on the command line:

./pants_run_2015_03_06_11_51_17_807/tool_outputs:
total 240
-rw-r--r--  1 zundel  zundel     0 Mar  6 11:51 antlr-0aa953f3-ecaf-42b9-922c-625f2c423d25.stderr
-rw-r--r--  1 zundel  zundel     0 Mar  6 11:51 antlr-0aa953f3-ecaf-42b9-922c-625f2c423d25.stdout
-rw-r--r--  1 zundel  zundel     0 Mar  6 11:51 antlr-9fb39976-b659-4fd3-9de8-20e24b0c1230.stderr
-rw-r--r--  1 zundel  zundel     0 Mar  6 11:51 antlr-9fb39976-b659-4fd3-9de8-20e24b0c1230.stdout
-rw-r--r--  1 zundel  zundel   104 Mar  6 11:51 bootstrap-antlr3-805f33b8-a85a-4d2d-8219-6294b8e4d768.stderr
-rw-r--r--  1 zundel  zundel  1157 Mar  6 11:51 bootstrap-antlr3-805f33b8-a85a-4d2d-8219-6294b8e4d768.stdout
  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
ZU
  1. 
      
  2. src/python/pants/base/workunit.py (Diff revision 1)
     
     

    Not sure if I need to escape the in \s here or make this a triple quoted string.

    1. For regular expressions, always use a raw string. This should be r'[\s/]'

  3. 
      
ZU
ZU
PA
  1. Ship It!
  2. 
      
BE
  1. 
      
  2. src/python/pants/base/workunit.py (Diff revision 2)
     
     

    Is this enough to make them filesystem safe always? Maybe replace all of \W?

  3. 
      
ZU
BE
  1. Ship It!
  2. 
      
ZU
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks Patrick and Benjy. Commit 7d87ef3

Loading...