Can you request subversion to find all checks from a specific author from the watch

I would like to run a subversion request to find all the checks performed by a specific user outside of normal business hours (from 9am to 5pm), is there any way to do this?

+4
source share
3 answers

I took ChrisK advice and created an XML file using the following syntax ...

svn log <url> --xml <path> 

And then used the following query in C # LinqPad expressions to define all checks outside the clock.

 var xml = XElement.Load (@"c:\\work\\log.xml"); var query = from logEntry in xml.Elements() from myDate in logEntry.Elements() //from author in logEntry.Elements() //These lines get a specific author //where author.Value == "digiguru" //where author.Name == "author" where myDate.Name == "date" where !(DateTime.Parse(myDate.Value).Hour >= 9 && DateTime.Parse(myDate.Value).Hour <= 17) select logEntry; query.Dump(); 
+1
source

You can get the subversion als xml history from the command line:

 svn log <url> --xml 

Then you can write a script to analyze the output and apply the search criteria ...

+4
source

You can rate it and specify the hour at a time

  svn log | sed -n '/ XX:/,/-----$/ p' 

Replace XX with the hour you want to use. 22.

Edit: To display all the hours you want, you can make a script that runs this command for every hour and puts it in a log file.

  #!/bin/sh svn log | sed -n '/ 19:/,/-----$/ p' >> svn.log svn log | sed -n '/ 20:/,/-----$/ p' >> svn.log svn log | sed -n '/ 21:/,/-----$/ p' >> svn.log svn log | sed -n '/ 22:/,/-----$/ p' >> svn.log ... 
+2
source

Source: https://habr.com/ru/post/1332351/


All Articles