Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 13 May 2014 16:29:42 -0700] rev 21575
revert: add some inline comments
I spend some time understanding how this part of the revert code is
working. I'm adding some comments to help the code readability. I
expect most of them to disappear in a coming refactoring. But the
refactoring should be easier to follow with the comment.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 13 May 2014 16:29:20 -0700] rev 21574
revert: cosmetic align of the dispatch table
This changeset make a minimal cosmetic change to help readability of the value
in this table.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 13 May 2014 17:28:19 -0700] rev 21573
revert: add a test case to reverting "add" during merges
This kind of revert is specifically trickier since the file is
reported as "modified" by status. This case was only tested by some
largefiles test. We introduce proper testing of all aspects of this
case in the revert tests themselves.
Yuya Nishihara <yuya@tcha.org> [Sat, 17 May 2014 15:14:18 +0900] rev 21572
alias: change return code of bad definition to 255
We use 255 for general command error.
It can't raise util.Abort because help module executes badalias command to get
error message.
Matt Mackall <mpm@selenic.com> [Tue, 27 May 2014 15:16:52 -0700] rev 21571
bookmarks: properly align multi-byte characters
Matt Mackall <mpm@selenic.com> [Tue, 27 May 2014 15:13:13 -0700] rev 21570
tests: fix cut and paste error on encoding alignment test
Yuya Nishihara <yuya@tcha.org> [Sat, 17 May 2014 13:06:16 +0900] rev 21569
alias: handle shlex error in command aliases
No command should fail with ValueError just because there is unparseable
alias definition.
It returns 1 like other badalias handlers, but should be changed to 255 in
a later version because we use 255 for general command error.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 08 May 2014 19:03:00 +0900] rev 21568
subrepo: normalize path in the specific way for problematic encodings
Before this patch, "reporelpath()" uses "rstrip(os.sep)" to trim
"os.sep" at the end of "parent.root" path.
But it doesn't work correctly with some problematic encodings on
Windows, because some multi-byte characters in such encodings contain
'\\' (0x5c) as the tail byte of them.
In such cases, "reporelpath()" leaves unexpected '\\' at the beginning
of the path returned to callers.
"lcalrepository.root" seems not to have tail "os.sep", because it is
always normalized by "os.path.realpath()" in "vfs.__init__()", but in
fact it has tail "os.sep", if it is a root (of the drive): path
normalization trims tail "os.sep" off "/foo/bar/", but doesn't trim
one off "/".
So, just avoiding "rstrip(os.sep)" in "reporelpath()" causes
regression around
issue3033 fixed by
fccd350acf79.
This patch introduces "pathutil.normasprefix" to normalize specified
path in the specific way for problematic encodings without regression
around
issue3033.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 08 May 2014 19:03:00 +0900] rev 21567
subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos
Before this patch, sanitizing ".hg/hgrc" scans directories and files
also in meta data area for non-hg subrepos: under ".svn" for
Subversion subrepo, for example.
This may cause not only performance impact (especially in large scale
subrepos) but also unexpected removing meta data files.
This patch avoids sanitizing ".hg/hgrc" in meta data area for non-hg
subrepos.
This patch stops checking "ignore" target at the first
(case-insensitive) appearance of it, because continuation of scanning
is meaningless in almost all cases.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 08 May 2014 19:03:00 +0900] rev 21566
subrepo: make "_sanitize()" take absolute path to the root of subrepo
Before this patch, "hg update" doesn't sanitize ".hg/hgrc" in non-hg
subrepos correctly, if "hg update" is executed not at the root of the
parent repository.
"_sanitize()" takes relative path to subrepo from the root of the
parent repository, and passes it to "os.walk()". In this case,
"os.walk()" expects CWD to be equal to the root of the parent
repository.
So, "os.walk()" can't find specified path (or may scan unexpected
path), if CWD isn't equal to the root of the parent repository.
Non-hg subrepo under nested hg-subrepos may cause same problem, too:
CWD may be equal to the root of the outer most repository, or so.
This patch makes "_sanitize()" take absolute path to the root of
subrepo to sanitize correctly in such cases.
This patch doesn't normalize the path to hostile files as the one
relative to CWD (or the root of the outer most repository), to fix the
problem in the simple way suitable for "stable".
Normalizing should be done in the future: maybe as a part of the
migration to vfs.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 08 May 2014 19:03:00 +0900] rev 21565
subrepo: invoke "_sanitize()" also after "git merge --ff"
Before this patch, sanitizing ".hg/hgrc" in git subrepo doesn't work,
when the working directory is updated by "git merge --ff".
"_sanitize()" is not invoked after checking target revision out into
the working directory in this case, even though it is invoked
indirectly via "checkout" (or "rawcheckout") in other cases.
This patch invokes "_sanitize()" explicitly also after "git merge
--ff" execution.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 08 May 2014 19:03:00 +0900] rev 21564
subrepo: make "_sanitize()" work
"_sanitize()" was introduced by
224e96078708 on "stable" branch, but
it has done nothing for sanitizing since
224e96078708.
"_sanitize()" assumes "Visitor" design pattern:
"os.walk()" should invoke specified function ("v" in this case)
for each directory elements under specified path
but "os.walk()" assumes "Iterator" design pattern:
callers of it should drive loop to scan each directory elements
under specified path by themselves with the returned generator
object
Because of this mismatching, "_sanitize()" just discards the generator
object returned by "os.walk()" and does nothing for sanitizing.
This patch makes "_sanitize()" work.
This patch also changes the format of warning message to show each
unlinked files, for multiple appearances of "potentially hostile
.hg/hgrc".
Chinmay Joshi <c@chinmayjoshi.com> [Tue, 27 May 2014 23:02:05 +0530] rev 21563
vfs: add lexists() in current api
lexists is added in current API of vfs.
Chinmay Joshi <c@chinmayjoshi.com> [Tue, 27 May 2014 21:56:03 +0530] rev 21562
bundlerepo: update unlink in getremotechanges to use vfs
As per WindowsUTF8 plan, unlink from getremotechanges is updated to use vfs in this change.
Matt Mackall <mpm@selenic.com> [Tue, 27 May 2014 12:09:34 -0700] rev 21561
docker: update package target to packages/
Matt Mackall <mpm@selenic.com> [Tue, 27 May 2014 11:52:39 -0700] rev 21560
packaging: move output directory from build/ to packages/
setuptools owns build/ and dist/ and we want to have our own scheme
Matt Mackall <mpm@selenic.com> [Tue, 27 May 2014 11:39:22 -0700] rev 21559
make: add a basic osx mpkg target
Matt Mackall <mpm@selenic.com> [Tue, 27 May 2014 10:31:59 -0700] rev 21558
setup: make Xcode 5.1 check less specific
Was failing on "5.1\n".
Matt Mackall <mpm@selenic.com> [Mon, 26 May 2014 18:16:23 -0700] rev 21557
merge with stable
Yuya Nishihara <yuya@tcha.org> [Sat, 17 May 2014 14:43:06 +0900] rev 21556
alias: fix loss of non-zero return code in command aliases
This also includes test for shell aliases. It avoid using "false" command
because "man false" does not say "exit with 1" but "exit with a status code
indicating failure."
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 22 May 2014 16:27:16 -0700] rev 21555
exchange: drop dead code
This code have been factorised and moved in its own function by
7d0bbb6dd730. We
actually read the result of this other computation in the very line before the
deleted block. I somehow forgot to remove the original code, but it is now
dead. Good bye duplicated computation.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 22 May 2014 13:39:55 -0700] rev 21554
exchange: fix indentation level
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 08 May 2014 17:08:17 -0700] rev 21553
import: add --partial flag to create a changeset despite failed hunks
The `hg import` command gains a `--partial` flag. When specified, a commit will
always be created from a patch import. Any hunk that fails to apply will
create .rej file, same as what `hg qimport` would do. This change is mainly
aimed at preserving changeset metadata when applying a patch, something very
important for reviewers.
In case of failure with `--partial`, `hg import` returns 1 and the following
message is displayed:
patch applied partially
(fix the .rej files and run `hg commit --amend`)
When multiple patches are imported, we stop at the first one with failed hunks.
In the future, someone may feel brave enough to tackle a --continue flag to
import.
Mads Kiilerich <madski@unity3d.com> [Mon, 19 May 2014 01:53:34 +0200] rev 21552
update: introduce --tool for controlling the merge tool
Update is a kind of merge and may also need a merge tool and should have the
options described in the merge-tools help.