Maven SCM
  1. Maven SCM
  2. SCM-671

Perforce provider Edit command incorrectly ignores working Directory

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Labels:
      None
    • Environment:
      maven 3.0.3
    • Complexity:
      Intermediate
    • Number of attachments :
      2

      Description

      When the working directory is something other than "." the perforce edit command does not include the relative path to the files actually being edited. For instance in the case where the directory structure is:

      pom.xml
      a/pom.xml
      a/foo.xml

      The command
      mvn scm:edit -f a/pom.xml -Dincludes=foo.xml
      will result in a failure because the method PerforceEditCommand.createCommandLine is assembling the path as if foo/.xml were at the top level.

      A second instance is the case where the directory structure is:

      pom.xml
      a/pom.xml
      a/b/pom.xml
      a/b/c/pom.xml

      The command
      mvn scm:edit -f a/pom.xml -Dincludes=**/pom.xml
      will result in only the top-level pom.xml being opened for editing, when it should open b/pom.xml and b/c/pom.xml

      1. patch
        0.6 kB
        Don Walling
      2. PerforceEditCommandTest.java
        3 kB
        Don Walling

        Activity

        Hide
        Don Walling added a comment -

        Modified JUnit test showing the problem. The testRelativeCommandLine test will fail with verison 1.6 of the perforce scm plugin

        Show
        Don Walling added a comment - Modified JUnit test showing the problem. The testRelativeCommandLine test will fail with verison 1.6 of the perforce scm plugin
        Hide
        Don Walling added a comment -

        patch file - one line change in PerforceEditCommand.java addresses the issue

        Show
        Don Walling added a comment - patch file - one line change in PerforceEditCommand.java addresses the issue
        Hide
        Olivier Lamy added a comment -

        applied.
        Thanks!

        Show
        Olivier Lamy added a comment - applied. Thanks!

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            Don Walling
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: