[ https://jira.codehaus.org/browse/SCM-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=349767#comment-349767 ]
Todd Currie commented on SCM-735: --------------------------------- This patch should be adjusted to take into account SCM-745. The regular expression should not make use of the greedy wild card match, otherwise the author name can become corrupted depending on the text of the change description. >From the attached patch: @@ -36,7 +36,7 @@ public class PerforceFilelogConsumer { private static final String PERFORCE_TIMESTAMP_PATTERN = "yyyy/MM/dd"; - private static final String LINE_PATTERN = "#(\\d+).*on (.*) by (.*)@"; + private static final String LINE_PATTERN = "#(\\d+) change (\\d+) .* on (.*) by (.*)@"; Should be: @@ -36,7 +36,7 @@ public class PerforceFilelogConsumer { private static final String PERFORCE_TIMESTAMP_PATTERN = "yyyy/MM/dd"; - private static final String LINE_PATTERN = "#(\\d+).*on (.*) by (.*)@"; + private static final String LINE_PATTERN = "#(\\d+) change (\\d+) .*? on (.*?) by (.*?)@"; > Blame result on branched file is incorrect > ------------------------------------------ > > Key: SCM-735 > URL: https://jira.codehaus.org/browse/SCM-735 > Project: Maven SCM > Issue Type: Bug > Components: maven-scm-provider-perforce > Affects Versions: 1.8.1 > Reporter: Gregory SSI-YAN-KAI > Attachments: scm.patch > > > When a file is branched, its revision id restarts from 1. > So, 2 different lines can have the same revision id even though they have > been submitted in 2 different changelists. > Since the perforce blame command is based on the revision id of each line, > the result might be incorrect. > The solution I'm proposing in the attached patch is to use changelist number > to identify the author of a line. -- This message was sent by Atlassian JIRA (v6.1.6#6162)