develooper Front page | perl.perl5.porters | Postings from October 2003

[PATCH] change p4d2p to deal with new style diff2 output

Thread Next
From:
Jan Dubois
Date:
October 30, 2003 18:44
Subject:
[PATCH] change p4d2p to deal with new style diff2 output
Message ID:
dpi3qvgf1uke7pj1gcpgmoh622lqcvl6uc@4ax.com
Current versions of p4 add a "summary" field to the end of the header
line:

|         Diff2 introduces each diff with a header line of the form
| 
|                 ==== file1 (type1) - file2 (type2) ==== summary
| 
|         file1 or file2 may be '<none>', meaning that only one of the
|         matched files actually exists at the given revision.   The
|         summary is one of: 'identical' - file contents are identical and
|         types are the same, 'types' - file contents are identical but
|         the types are different, and 'content' - file contents are
|         different.

Attached patch makes p4d2p accept these diff2 listings.

Cheers,
-Jan

Index: Porting/p4d2p
--- Porting/p4d2p.~1~	Thu Oct 30 17:30:01 2003
+++ Porting/p4d2p	Thu Oct 30 17:30:01 2003
@@ -36,7 +36,7 @@
 }
 
 my ($cur, $match);
-$cur = m<^==== //depot/(.+?)\#\d+.* ====$> ... m<^(\@\@.+\@\@|\*+)$>;
+$cur = m<^==== //depot/(.+?)\#\d+.* ====( \w+)?$> ... m<^(\@\@.+\@\@|\*+)$>;
 
 $match = $1;
 
End of Patch.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About