Wed, 19 Nov 2014 18:35:14 +0900 subrepo: remove "_getstorehashcachepath" referred by no other code paths
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23373
subrepo: remove "_getstorehashcachepath" referred by no other code paths
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: replace direct file APIs around "writelines" by "vfs.writelines"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23372
subrepo: replace direct file APIs around "writelines" by "vfs.writelines" This patch also replaces "self._getstorehashcachepath" (building absolute path up) by "self._getstorehashcachename" (building relative path up), because "vfs.writelines" requires relative path.
Wed, 19 Nov 2014 18:35:14 +0900 vfs: add "writelines"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23371
vfs: add "writelines" This patch allows "writelines" to take "mode" and "notindexed" arguments, because subsequent patch for subrepo requires both.
Wed, 19 Nov 2014 18:35:14 +0900 vfs: add "notindexed" argument to invoke "ensuredir" with it in write mode
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23370
vfs: add "notindexed" argument to invoke "ensuredir" with it in write mode This patch uses "False" as default value of "notindexed" argument, even though "vfs.makedir()" uses "True" for it, because "os.mkdir()" doesn't set "_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED" attribute to newly created directories.
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: replace direct file APIs around "readlines" by "vfs.tryreadlines"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23369
subrepo: replace direct file APIs around "readlines" by "vfs.tryreadlines" This patch also replaces "self._getstorehashcachepath" (building absolute path up) by "self._getstorehashcachename" (building relative path up), because "vfs.tryreadlines" requires relative path. This patch makes "_readstorehashcache()" return "[]" (returned by "vfs.tryreadlines()"), when cache file doesn't exist, even though "_readstorehashcache()" returned '' (empty string) in such case before this patch. "_readstorehashcache()" is invoked only by the code path below in "_storeclean()": for filehash in self._readstorehashcache(path): if filehash != itercache.next(): clean = False break In this case, "[]" and '' don't differ from each other, because both of them cause avoiding iteration of "for loop".
Wed, 19 Nov 2014 18:35:14 +0900 vfs: add "readlines" and "tryreadlines"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23368
vfs: add "readlines" and "tryreadlines" This patch allows "readlines" and "tryreadlines" to take "mode" argument, because "subrepo" requires to read files not in "rb" (binary, default for vfs) but in "r" (text) mode in subsequent patch.
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: add "_cachestorehashvfs" to handle cache store hash files via vfs
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23367
subrepo: add "_cachestorehashvfs" to handle cache store hash files via vfs This "vfs" object will be used by subsequent patches to handle cache store hash files without direct file APIs. This patch decorates "_cachestorehashvfs" with "@propertycache" to delay vfs creation, because it is used only for cooperation with other repositories. In this patch, "/" is used as the path separator, even though "self._repo.join" uses platform specific path separator (e.g. "\\" on Windows). But it is reasonable enough, because "store" and other management file handling already include such implementation, and they work well.
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: remove "_calcfilehash" referred by no other code paths
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23366
subrepo: remove "_calcfilehash" referred by no other code paths
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: replace "_calcfilehash" invocation by "vfs.tryread"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23365
subrepo: replace "_calcfilehash" invocation by "vfs.tryread" "_calcfilehash" can be completely replaced by simple "vfs.tryread" invocation. def _calcfilehash(filename): data = '' if os.path.exists(filename): fd = open(filename, 'rb') data = fd.read() fd.close() return util.sha1(data).hexdigest() Building absolute path "absname" up by "self._repo.join" for files in "filelist" is avoided, because "vfs.tryread" does so internally.
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: replace "os.path.exists" by "exists" via wvfs of the parent
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23364
subrepo: replace "os.path.exists" by "exists" via wvfs of the parent Existance of specified "path" should be examined by "exists" via wvfs of the parent repository, because the working directory of the parent repository may be in UTF-8 mode. Wide API should be used via wvfs in such case. In this patch, "/" is used as the path separator, even though "path" uses platform specific path separator (e.g. "\\" on Windows). But it is reasonable enough, because "store" and other management file handling already include such implementation, and they work well.
Wed, 19 Nov 2014 18:35:14 +0900 subrepo: avoid redundant "util.makedirs" invocation
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 19 Nov 2014 18:35:14 +0900] rev 23363
subrepo: avoid redundant "util.makedirs" invocation "util.makedirs" for the (sub-)repository root of "hgsubrepo" is also executed in the constructor of "localrepository", if "create" is True and ".hg" of it doesn't exist. This patch avoids redundant "util.makedirs" invocation in the constructor of "hgsubrepo".
Wed, 19 Nov 2014 08:50:08 -0800 merge: remove confusing comment about --force
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Nov 2014 08:50:08 -0800] rev 23362
merge: remove confusing comment about --force manifestmerge() has a piece of code that's roughly: if not force and different: abort else: # if different: old untracked f may be overwritten and lost ... The comment only talks about what happens when 'different' is true, and in combination with the if-block above, that must mean that it is only about what happens when 'force and different'. It seems quite fine that files are overwritten when 'force' is true, so let's remove the comment. As it stands, it can easily be interpreted as a TODO (which is how I interpreted it at first).
Fri, 17 Oct 2014 22:23:06 -0700 phases: read pending data when appropriate
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 22:23:06 -0700] rev 23361
phases: read pending data when appropriate If we are called by a hook and pending data exists, read those.
Sun, 28 Sep 2014 21:27:48 -0700 bookmark: read pending data when appropriate
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 21:27:48 -0700] rev 23360
bookmark: read pending data when appropriate If we are called by a hook and pending data exists, read it.
Wed, 12 Nov 2014 16:54:57 +0000 test-bundle2: check visible data in pre/post-transaction hooks
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 12 Nov 2014 16:54:57 +0000] rev 23359
test-bundle2: check visible data in pre/post-transaction hooks We are about to make bookmarks and phases available for hooks. Therefore we need a witness for this new availability. We introduce the new hooks in a distinct changeset to reduce the noise in the ones with actual changes.
Fri, 17 Oct 2014 22:19:05 -0700 transaction: write pending generated files
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 22:19:05 -0700] rev 23358
transaction: write pending generated files Such file are generated with a .pending prefix. It is up to the reader to implement the necessary logic for reading pending files. We add a test to ensure pending files are properly cleaned-up in both success and error cases.
Fri, 17 Oct 2014 21:57:32 -0700 transaction: have _generatefile return a boolean
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 21:57:32 -0700] rev 23357
transaction: have _generatefile return a boolean The function returns True if any files were generated. This will be used to know if any pending files have been written.
Mon, 29 Sep 2014 01:29:08 -0700 transaction: allow generating files with a suffix
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 29 Sep 2014 01:29:08 -0700] rev 23356
transaction: allow generating files with a suffix This will allow us to generate temporary pending files. Files generated with a suffix are assumed temporary and will be cleaned up at the end of the transaction.
Wed, 19 Nov 2014 09:52:05 -0600 transaction: fix some docstring grammar
Matt Mackall <mpm@selenic.com> [Wed, 19 Nov 2014 09:52:05 -0600] rev 23355
transaction: fix some docstring grammar
Wed, 12 Nov 2014 14:57:41 +0000 transaction: accept a 'location' argument for registertmp
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 12 Nov 2014 14:57:41 +0000] rev 23354
transaction: accept a 'location' argument for registertmp This will allow generation of temporary files outside of store. This will be useful for bookmarks.
Tue, 18 Nov 2014 23:51:58 -0500 tests: handle differences between missing file error strings on Windows and Unix
Matt Harbison <matt_harbison@yahoo.com> [Tue, 18 Nov 2014 23:51:58 -0500] rev 23353
tests: handle differences between missing file error strings on Windows and Unix
Tue, 18 Nov 2014 22:02:00 -0500 run-tests: don't warn on unnecessary globs mandated by check-code.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 18 Nov 2014 22:02:00 -0500] rev 23352
run-tests: don't warn on unnecessary globs mandated by check-code.py When test output is processed, if os.altsep is defined (i.e. on Windows), TTest.globmatch() will cause a warning later on if a line has a glob that isn't necessary. Unfortunately, the regex checking in check-code.py doesn't have this context. Therefore we ended up with cases where the test would get flagged with a warning only on Windows because a glob was present, because check-code.py would warn if it wasn't. For example, from test-subrepo.t: $ hg -R issue1852a push `pwd`/issue1852c pushing to $TESTTMP/issue1852c (glob) The glob isn't necessary here because the slash is shown as it was provided. However, check-code mandates one to handle the case where the default path has backslashes in it. Break the cycle by checking against a subset of the check-code rules before flagging the test with a warning, and ignore the superfluous glob if it matches a rule. This change fixes warnings in test-largefiles-update.t, test-subrepo.t, test-tag.t, and test-rename-dir-merge.t on Windows. I really hate that the rules are copy/pasted here (minus the leading two spaces) because it would be nice to only update the rules once, in a single place. But I'm not sure how else to do it. I'm open to suggestions. Splitting some of the rules out of check-code.py seems wrong, but so does moving check-code.py out of contrib, given that other checking scripts live there. There are other glob patterns that could be copied over, but this is enough to make the current tests run on Windows.
Tue, 18 Nov 2014 16:14:32 -0800 update: remove unnecessary check for unknown files with --check
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 Nov 2014 16:14:32 -0800] rev 23351
update: remove unnecessary check for unknown files with --check As far as I and the test suite can tell, the checks in manifestmerge() already report the errors (whether or not --check is given), so we don't need to call merge.checkunknown(). Since this is the last call to the method, also remove the method.
Tue, 18 Nov 2014 12:29:30 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 18 Nov 2014 12:29:30 -0600] rev 23350
merge with stable
Sun, 16 Nov 2014 22:03:57 -0500 tests: move a multi-statement debuglocks hook into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Nov 2014 22:03:57 -0500] rev 23349
tests: move a multi-statement debuglocks hook into a shell script for Windows Before this patch, a part of "test-push-hook-lock.t" fails unexpectedly on Windows environment, because semicolon (";") isn't recognized as the command separator by "cmd.exe". This is fixed the same way as a similar issue in 7c253c23de3b.
Sun, 16 Nov 2014 16:26:15 -0500 tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Nov 2014 16:26:15 -0500] rev 23348
tests: fix globs for Windows test-largefiles-update.t, test-subrepo.t, test-tag.t, and test-rename-dir-merge.t still warn about no result returned because of unnecessary globs that test-check-code-hg.t wants, relating to output for pushing to, pulling from and moving X to Y.
Tue, 04 Nov 2014 12:46:00 -0500 run-tests: include quotes in the HGEDITOR value when storing sys.executable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 04 Nov 2014 12:46:00 -0500] rev 23347
run-tests: include quotes in the HGEDITOR value when storing sys.executable This fixes test-install.t on Windows that broke in 2122b82b6987 when shlex.split() was added to the debuginstall command: @@ -7,8 +7,11 @@ checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking commit editor... + Can't find editor 'c:\Python27\python.exe -c "(omitted)"' in PATH + (specify a commit editor in your configuration file) checking username... - no problems detected + 1 problems detected, please check your install! + [1] What happens is that shlex.split() on Windows turns this: c:\Python27\python.exe -c "import sys; sys.exit(0)" into this: ['c:Python27python.exe', '-c', 'import sys; sys.exit(0)'] While technically a regression, most programs on Windows live in some flavor of 'Program Files', and therefore the environment variable needs to contain quotes anyway to handle the space. This wasn't handled prior to the shlex() change, because it tested the whole environment variable to see if it was an executable, or split on the first space and tested again.
Mon, 17 Nov 2014 01:48:43 +0100 mq: when adding headers in plain mode, separate them from message (issue4453) stable
Mads Kiilerich <madski@unity3d.com> [Mon, 17 Nov 2014 01:48:43 +0100] rev 23346
mq: when adding headers in plain mode, separate them from message (issue4453) c87f2a5a6e49 did a clean-up in one direction ... but we want it in the other direction.
Mon, 17 Nov 2014 01:48:19 +0100 mq: introduce insertplainheader - same naive implementation as before stable
Mads Kiilerich <madski@unity3d.com> [Mon, 17 Nov 2014 01:48:19 +0100] rev 23345
mq: introduce insertplainheader - same naive implementation as before
Sun, 16 Nov 2014 19:57:40 +0100 mq: when setting message in plain mode, separate it from header (issue4453) stable
Mads Kiilerich <madski@unity3d.com> [Sun, 16 Nov 2014 19:57:40 +0100] rev 23344
mq: when setting message in plain mode, separate it from header (issue4453) Fix inconsistent handling of plain header separation in mq patcheader - and contrary to c87f2a5a6e49, do it in the direction of having an empty line between header and description. Plain patches are like mails and should thus have an empty line between headers and body in compliance with RFC 822 3.1.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip