Tuesday, September 2, 2014

TF CLC pending changes look abhorrent

I keep wondering who does this look readable to ? Isn't there too much information duplication here ? What's wrong with the existing .diff format ? Why invent a new standard ? Merely creating a new  standard won't do !! you have to make it work for the users !!

Microsoft seems to be in perpetual denial about it's rock stardom, like a high school teenager, it seems to think people will call it cool just because it is going against the norm. No ! going against the norm is not the only criterion . Making it better than the norm is what makes it cool. Wheather it goes against the norm or it extends and furthers the norm is immaterial to the user. 

$/Cobalt Search/Development/CobaltPlatformSearch
.checkstyleConfig.xml                                                                                       edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.checkstyleConfig.xml
.tfignore                                                                                                   add    C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tfignore
.tpignore                                                                                                   edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tpignore
gradle.properties                                                                                           add    C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\gradle.properties
ivy.xml                                                                                                     edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ivy.xml

$/Cobalt Search/Development/CobaltPlatformSearch/ant
deploy.xml                                                                                                  edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ant\deploy.xml

$/Cobalt Search/Development/CobaltPlatformSearch/config
spring-imports.xml                                                                                          edit   C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\config\spring-imports.xml

Attaching the image below to show the actual command line output. 






What's wrong with something simpler, shouldn't brief be simple ? - for removed files, + for added files, * for edited files.



-  C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.checkstyleConfig.xml
+ C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tfignore
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\.tpignore
+ C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\gradle.properties
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ivy.xml
C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\ant\deploy.xml
* C:\Users\uc180375\workspaces\search\CobaltPlatformSearch\config\spring-imports.xml



Shell Script that will clean this mess


#!/bin/bash

tf status -login\:domain\\user,pass -workspace:workspace -format:brief > ~/tmp

# Change windows CRLF to Unix
sed -i 's/\r//' ~/tmp

# Remove first two lines, they are table header.
sed 1,2d ~/tmp >~/tmp1
mv ~/tmp1 ~/tmp 

# Remove all the lines starting with "$/" those lines show the directory on TFS server.
awk '!/^\$\//' ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp 

# Remove empty lines
awk 'NF > 0' ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp
 

##sed 's/[\/t]*[ ]*add//'
##sed -n 's/.*add -t //p' ~/tmp

#awk '/add|edit/+ {print $NF}' ~/tmp > ~/tmp1
awk '{print substr($0, index($0, $2))}'  ~/tmp > ~/tmp1
mv ~/tmp1 ~/tmp

STATUS_OUTPUT=`cat ~/tmp` 
rm ~/tmp

echo "$STATUS_OUTPUT"

No comments:

Post a Comment