CONTRIBUTING
author Matt Harbison <matt_harbison@yahoo.com>
Tue, 01 Oct 2024 15:00:39 -0400
changeset 51930 bc9ed92d4753
parent 30084 a492610a2fc1
permissions -rw-r--r--
util: make `mmapread()` work on Windows again 522b4d729e89 started referencing `mmap.MAP_PRIVATE`, but that's not available on Windows, so `hg version` worked, but `make local` did not. That commit also started calling the constructor with the fine-grained `flags` and `prot` args, but those aren't available on Windows either[1] (though the backing C code doesn't seem conditionalized to disallow usage of them). I assume the change away from from the `access` arg was to provide the same options, plus `MAP_POPULATE`. Looking at the source code[2], they're not quite the same- `ACCESS_READ` is equivalent to `flags = MAP_SHARED` and `prot = PROT_READ`. `MAP_PRIVATE` is only used with `ACCESS_COPY`, which allows read and write. Therefore, we can't quite get the same baseline flags on Windows, but this was the status quo ante and `MAP_POPULATE` is a Linux thing, so presumably it works. I realize that typically the OS differences are abstracted into the platform modules, but I'm leaving it here so that it is obvious what the differences are between the platforms. [1] https://docs.python.org/3/library/mmap.html#mmap.mmap [2] https://github.com/python/cpython/blob/5e0abb47886bc665eefdcc19fde985f803e49d4c/Modules/mmapmodule.c#L1539
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30084
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
Our full contribution guidelines are in our wiki, please see:
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
https://www.mercurial-scm.org/wiki/ContributingChanges
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
If you just want a checklist to follow, you can go straight to
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
If you can't run the entire testsuite for some reason (it can be
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
difficult on Windows), please at least run `contrib/check-code.py` on
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
any files you've modified and run `python contrib/check-commit` on any
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
commits you've made (for example, `python contrib/check-commit
a492610a2fc1 contributing: add new file with a pointer to the wiki
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
273ce12ad8f1` will report some style violations on a very old commit).