contrib/packagelib.sh
author Matt Harbison <matt_harbison@yahoo.com>
Thu, 06 Aug 2015 21:00:16 -0400
branchstable
changeset 26000 9ac4e81b9659
parent 24972 56c64c91b429
child 26833 6474b64045fb
permissions -rw-r--r--
match: fix a caseonly rename + explicit path commit on icasefs (issue4768) The problem was that the former name and the new name are both normalized to the case in dirstate, so matcher._files would be ['ABC.txt', 'ABC.txt']. localrepo.commit() calls localrepo.status(), passing along the matcher. Inside dirstate.status(), _walkexplicit() simply grabs matcher.files() and processes those items. Since the old name isn't present, it is silently dropped. There's a fundamental tension here, because the status command should also accept files that don't match the filesystem, so we can't drop the normalization in status. The problem originated in baa11dde8c0e. Unfortunately with this change, the case of the old file must still be specified exactly, or the old file is again silently excluded. I went back to baa11dde8c0e^, and that had the same behavior, so we are no worse off. I'm open to ideas from a matcher or dirstate expert on how to fix that half.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24972
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
gethgversion() {
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
    make clean
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
    make local || make local PURE=--pure
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
    HG="$PWD/hg"
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
    $HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; }
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
    hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
    if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
        # nightly build case, version is like 1.3.1+250-20b91f91f9ca
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
        version=`echo $hgversion | cut -d- -f1`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
        release=`echo $hgversion | cut -d- -f2 | sed -e 's/+.*//'`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
    else
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    15
        # official tag, version is like 1.3.1
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
        version=`echo $hgversion | sed -e 's/+.*//'`
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    17
        release='0'
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    18
    fi
56c64c91b429 packaging: extract packagelib for common code from builddeb and buildrpm
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
}