Re: [Codestriker-user] code reviewing new files
Brought to you by:
sits
|
From: David S. <si...@us...> - 2005-07-09 03:46:35
|
Hi Tom, Yes, perforce diff unfortunately doesn't seem to create information for added/removed files, which is incredibly annoying. If you are reviewing code which has already been committed into the depot, then you can view added/removed files from the changeset using the p4 describe command. The format of unidiffs for new files is as follows: diff -uNr dir1/zot.txt dir2/zot.txt --- dir1/zot.txt Thu Jan 1 10:00:00 1970 +++ dir2/zot.txt Sat Jul 9 13:40:26 2005 @@ -0,0 +1,3 @@ +Here is some text +Here is some more +And even more. For removed files, it will look like: diff -uNr dir2/zot.txt dir1/zot.txt --- dir2/zot.txt Sat Jul 9 13:40:26 2005 +++ dir1/zot.txt Thu Jan 1 10:00:00 1970 @@ -1,3 +0,0 @@ -Here is some text -Here is some more -And even more. In the case of a perforce diff, which normally appears as something like: ==== //depot/codestriker.conf#1 - /home/sits/codestriker.conf ==== @@ -8,9 +8,7 @@ #$db = 'DBI:Pg:dbname=codestrikerdb'; $db = 'DBI:mysql:dbname=codestrikerdb'; -# Database user. -#$dbuser = 'system'; -$dbuser = 'codestriker'; +# Here are some new lines. # Database password. #$dbpasswd = 'manager'; We will need new files to look something like: ==== //depot/zot.txt#0 - /home/sits/zot.txt ==== @@ -0,0 +1,3 @@ +Here is some text +Here is some more +And even more. The p4 parser should then be able to handle this. Cheers, David |