Laurent Charignon <lcharignon@fb.com> [Thu, 23 Apr 2015 16:59:11 -0700] rev 24844
record: remove useless line in test
Remove a useless line in test to make the next patch cleaner.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 24 Apr 2015 23:52:41 +0900] rev 24843
revert: apply normallookup on reverted file if size isn't changed (issue4583)
Before this patch, reverting a file to the revision other than the
parent doesn't update dirstate. This seems to expect that timestamp
and/or size will be changed by reverting.
But if (1) dirstate of file "f" is filled with timestamp before
reverting and (2) size and timestamp of file "f" isn't changed at
reverting, file "f" is recognized as CLEAN unexpectedly.
This patch applies "dirstate.normallookup()" on reverted file, if size
isn't changed.
Making "localrepository.wwrite()" return length of written data is
needed to avoid additional (and redundant) "lstat(2)" on the reverted
file. "filectx.size()" can't be used to know it, because data may be
decoded at being written out.
BTW, interactive reverting may cause similar problem, too. But this
patch doesn't focus on fixing it, because (1) interactive (maybe slow)
reverting changes one (or both) of size/timestamp of reverted files in
many usecases, and (2) changes to fix it seems not suitable for stable
branch.
Pascal Quantin <pascal.quantin@gmail.com> [Thu, 23 Apr 2015 21:23:13 +0200] rev 24842
win32: remove cacert.pem file from Inno Setup installer
Duplicate the modification done in 6e38b6fc4123 for wix installer
so that CA certificates loading works fine with Python 2.7.9+.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Apr 2015 16:38:36 -0700] rev 24841
revert: accept just -I/-X without paths or -a/-i (issue4592)
'hg revert -I foo' currently fails with
abort: no files or directories specified
(use --all to revert all files, or 'hg update 1' to update)
It doesn't seem intentional that -I/-X without other paths or
--all/--interactive should fail, and it doesn't seem that harmful to
allow it either, so let's just do that.
Laurent Charignon <lcharignon@fb.com> [Tue, 21 Apr 2015 16:20:43 -0700] rev 24840
record: change wording for record curses interface
We are using record and crecord in different context, not just for commiting
changes but also reverting and shelving changes. This diff changes the wording
from commiting to confirming changes to avoid confusing the users with what
they are doing.
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Apr 2015 22:44:46 +0900] rev 24839
wix: remove cacert.pem from Windows distribution
It should not be included in the Windows installers because it prevents
loading CA certificates from the system store on Python 2.7.9, implemented
by 760a86865f80. The msi packages bundles Python 2.7.9, so cacert.pem is no
longer necessary.
Backed out changeset e5c2338d76b5
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 23 Apr 2015 22:39:21 +0900] rev 24838
tests: use double quote to quote arguments in hook for portability
On windows, single quote doesn't work as quote character in hook
command line, because "cmd.exe" doesn't recognize it as quoting
character. And this causes failure of test.
This patch uses double quote to quote arguments in hook instead of
single quote for portability.
Even though single quotes for "[hooks] pretxncommit" in
test-clone-pull-corruption.t seems to work correctly (may MinGW sh
treat specially ?) AFAIK, this patch also replaces them by double
quotes for consistency.
Laurent Charignon <lcharignon@fb.com> [Wed, 22 Apr 2015 13:56:30 -0700] rev 24837
record: fix record with change on moved file crashes (issue4619)
reverting 79fceed67676, add a test to prevent the issue from coming back.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 22 Apr 2015 23:38:55 +0900] rev 24836
check-code: check os.path.join(*, '') not working correctly with Python 2.7.9
Since Python 2.7.9, "os.path.join(path, '')" doesn't append "os.sep"
for UNC path (see issue4557 for detail).
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 22 Apr 2015 23:38:55 +0900] rev 24835
unionrepo: use pathutil.normasprefix to ensure os.sep at the end of cwd
Since Python 2.7.9, "os.path.join(path, '')" doesn't add "os.sep" at
the end of UNC path (see issue4557 for detail).
This makes unionrepo incorrectly work, if:
1. cwd is the root of UNC share (e.g. "\host\share"), and
2. mainreporoot is near cwd (e.g. "\host\sharefoo\repo")
- host of UNC path is same as one of cwd
- share of UNC path starts with one of cwd
3. "repopath" isn't specified in URI (e.g. "union:path/to/repo2")
For example:
$ hg --cwd \host\share -R \host\sharefoo\repo incoming union:path\to\repo2
In this case:
- os.path.join(r"\host\share", "") returns r"\host\share",
- r"\host\sharefoo\repo".startswith(r"\host\share") returns True, then
- r"foo\repo" is treated as repopath of unionrepo instead of
r"\host\sharefoo\repo"
This causes failure of combining "\host\sharefoo\repo" and another
repository: in addition to it, "\host\share\foo\repo" may be combined
with another repository, if it accidentally exists.
This patch uses "pathutil.normasprefix()" to ensure "os.sep" at the
end of cwd safely, even with some problematic encodings, which use
0x5c (= "os.sep" on Windows) as the tail byte of some multi-byte
characters.
BTW, normalization before "pathutil.normasprefix()" isn't needed in
this case, because "os.getcwd()" always returns normalized one.