Thu, 27 Nov 2014 10:16:56 -0500 narrowmatcher: propagate the rel() method
Matt Harbison <matt_harbison@yahoo.com> [Thu, 27 Nov 2014 10:16:56 -0500] rev 23686
narrowmatcher: propagate the rel() method The full path is propagated to the original match object since this is often used directly for printing a file name to the user. This is cleaner than requiring each caller to join the prefix with the file name prior to calling it, and will lead to not having to pass the prefix around separately. It is also consistent with the bad() and abs() methods in terms of the required input. The uipath() method now inherits this path building property. There is no visible change in path style for rel() because it ultimately calls util.pathto(), which returns an os.sep based path. (The previous os.path.join() was violating the documented usage of util.pathto(), that its third parameter be '/' separated.) The doctest needed to be normalized to '/' separators to avoid test differences on Windows, now that a full path is returned for a short filename. The test changes are to drop globs that are no longer necessary when printing an absolute file in a subrepo, as returned from match.uipath(). Previously when os.path.join() was used to add the prefix, the absolute path to a file in a subrepo was printed with a mix of '/' and '\'. The absolute path for a file not in a subrepo, as returned from match.uipath(), is still purely '/' based.
Fri, 28 Nov 2014 20:15:46 -0500 match: add the abs() method
Matt Harbison <matt_harbison@yahoo.com> [Fri, 28 Nov 2014 20:15:46 -0500] rev 23685
match: add the abs() method This is a utility to make it easier for subrepos to convert a file name to the full path rooted at the top repository. It can replace the various path joining lambdas, and doesn't require the prefix to be passed into the method that wishes to build such a path. The name is derived from the following pattern in annotate() and other places: name = ((pats and rel) or abs) The pathname separator is not os.sep in part to avoid confusion with variables named 'abs' or similar that _are_ '/' separated, and in part because some methods like cmdutils.forget() and maybe cmdutils.add() need to build a '/' separated path to the root repo. This can replace the manual path building there.
Mon, 29 Dec 2014 16:39:20 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 29 Dec 2014 16:39:20 -0600] rev 23684
merge with stable
Thu, 25 Dec 2014 23:33:26 +0900 posix: quote the specified string only when it may have to be quoted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 25 Dec 2014 23:33:26 +0900] rev 23683
posix: quote the specified string only when it may have to be quoted This patch makes "posix.shellquote" examine the specified string and quote it only when it may have to be quoted for safety, like as the previous patch for "windows.shellquote". In fact, on POSIX environment, quoting itself doesn't cause issues like issue4463. But (almost) equivalent quoting policy can avoid examining test result differently on POSIX and Windows (even though showing command line with "%r" causes such examination in "test-extdiff.t"). The last hunk for "test-extdiff.t" in this patch isn't needed for the previous patch for "windows.shellquote", because the code path of it is executed only "#if execbit" (= avoided on Windows).
Thu, 25 Dec 2014 23:33:26 +0900 windows: quote the specified string only when it has to be quoted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 25 Dec 2014 23:33:26 +0900] rev 23682
windows: quote the specified string only when it has to be quoted Before this patch, "windows.shellquote" (as used as "util.shellquote") always quotes specified strings with double quotation marks, for external process invocation. But some problematic applications can't work correctly, when command line arguments are quoted: see issue4463 for detail. On the other hand, quoting itself is needed to specify arguments containing whitespaces and/or some special characters exactly. This patch makes "windows.shellquote" examine the specified string and quote it only when it may have to be quoted for safety.
Thu, 25 Dec 2014 23:33:26 +0900 extdiff: rename the name of an argument for readability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 25 Dec 2014 23:33:26 +0900] rev 23681
extdiff: rename the name of an argument for readability To reduce amount of changes for review-ability, previous patch uses "args" as argument name of "dodiff()", even though "args" includes also the name of command to be executed (or full-path of it). This patch replaces "args" by more appropriate name "cmdline".
Thu, 25 Dec 2014 23:33:26 +0900 extdiff: avoid unexpected quoting arguments for external tools (issue4463)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 25 Dec 2014 23:33:26 +0900] rev 23680
extdiff: avoid unexpected quoting arguments for external tools (issue4463) Before this patch, all command line arguments for external tools are quoted by the combination of "shlex.split" and "util.shellquote". But this causes some problems. - some problematic commands can't work correctly with quoted arguments For example, 'WinMerge /r ....' is OK, but 'WinMerge "/r" ....' is NG. See also below for detail about this problem. https://bitbucket.org/tortoisehg/thg/issue/3978/ - quoting itself may change semantics of arguments For example, when the environment variable CONCAT="foo bar baz': - mydiff $CONCAT => mydiff foo bar baz (taking 3 arguments) - mydiff "$CONCAT" => mydiff "foo bar baz" (taking only 1 argument) For another example, single quoting (= "util.shellquote") on POSIX environment prevents shells from expanding environment variables, tilde, and so on: - mydiff "$HOME" => mydiff /home/foobar - mydiff '$HOME' => mydiff $HOME - "shlex.split" can't handle some special characters correctly It just splits specified command line by whitespaces. For example, "echo foo;echo bar" is split into ["echo", "foo;echo", "bar"]. On the other hand, if quoting itself is omitted, users can't specify options including space characters with "--option" at runtime. The root cause of this issue is that "shlex.split + util.shellquote" combination loses whether users really want to quote each command line elements or not, even though these can be quoted arbitrarily in configurations. To resolve this problem, this patch does: - prevent configurations from being processed by "shlex.split" and "util.shellquote" only (possibly) "findexe"-ed or "findexternaltool"-ed command path is "util.shellquote", because it may contain whitespaces. - quote options specified by "--option" via command line at runtime This patch also makes "dodiff()" take only one "args" argument instead of "diffcmd" and "diffopts. It also omits applying "util.shellquote" on "args", because "args" should be already stringified in "extdiff()" and "mydiff()". The last hunk for "test-extdiff.t" replaces two whitespaces by single whitespace, because change of "' '.join()" logic causes omitting redundant whitespaces.
Sun, 28 Dec 2014 23:59:57 +0100 subrepo: add forgotten annotation for reverting git subrepos
Mathias De Maré <mathias.demare@gmail.com> [Sun, 28 Dec 2014 23:59:57 +0100] rev 23679
subrepo: add forgotten annotation for reverting git subrepos Support for reverting git subrepos was added earlier, but the annotation to handle any subrepo errors was forgotten.
Sun, 28 Dec 2014 10:42:25 +0100 subrepo: add full revert support for git subrepos
Mathias De Maré <mathias.demare@gmail.com> [Sun, 28 Dec 2014 10:42:25 +0100] rev 23678
subrepo: add full revert support for git subrepos Previously, revert was only possible if the '--no-backup' switch was specified. Now, to support backups, we explicitly go over all modified files in the subrepo.
Tue, 23 Dec 2014 19:54:48 -0800 setup: don't fail when Python doesn't have the cygwinccompiler package
Ludovic Chabant <ludovic@chabant.com> [Tue, 23 Dec 2014 19:54:48 -0800] rev 23677
setup: don't fail when Python doesn't have the cygwinccompiler package Some Python installations like the ones available from the optware project for the Synology DiskStation NASes don't have that package, which means running the setup script will crash and exit right away. Instead, we now just use an empty/fake class for the HackedMingw32CCompiler, which we likely won't use anyway.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip