Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901115

webrev -N -r generates broken patch files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None

      Description

      When using the -r option to generate webrevs the webrev script creates a correct webrev but the patch file that is linked from the webrev is missing changes.

      Here's an examle that does the following: Creates a repository called "parent-repo", adds a commit, clones to a "child-repo", sets the push path, adds two commits and then creates a webrev.

      mkdir parent-repo
      cd parent-repo/
      hg init
      touch a.txt
      hg add a.txt
      hg commit -m "added a.txt"
      cd ..
      hg clone parent-repo child-repo
      cd child-repo/
      hg defpath -d
      touch b.txt
      hg add b.txt
      hg commit -m "added b.txt"
      touch c.txt
      hg add c.txt
      hg commit -m "added c.txt"
      ksh webrev.ksh -r 0

      If you run this with the latest webrev.sh script you get a webrev/index.html file that looks like this:

      ------ ------ ------ ------ --- New ----- Raw b.txt

          rev 1 : added b.txt

          0 lines changed: 0 ins; 0 del; 0 mod; 0 unchg

      ------ ------ ------ ------ --- New ----- Raw c.txt

          rev 2 : added c.txt

          0 lines changed: 0 ins; 0 del; 0 mod; 0 unchg


      But the patch file "child-repo.changeset" is empty.

      Changing the last line in the script above to just:

      ksh webrev.ksh

      Creates the same webrev/index.html file but it also creates a correct patch file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brutisso Bengt Rutisson (Inactive)
                Reporter:
                brutisso Bengt Rutisson (Inactive)
              • Votes:
                3 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: