Sun, 16 Aug 2015 09:30:37 +0900 reachableroots: unroll loop that checks if one of parents is reachable
Yuya Nishihara <yuya@tcha.org> [Sun, 16 Aug 2015 09:30:37 +0900] rev 26059
reachableroots: unroll loop that checks if one of parents is reachable The difference is small, but fewer loops should be better in general: revset #0: 0::tip 0) 0.001609 1) 0.001510 93%
Sat, 15 Aug 2015 19:38:03 +0900 reachableroots: handle error of PyList_Append()
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Aug 2015 19:38:03 +0900] rev 26058
reachableroots: handle error of PyList_Append()
Fri, 07 Aug 2015 22:39:47 -0700 commands.push: use paths API
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Aug 2015 22:39:47 -0700] rev 26057
commands.push: use paths API ui.path instances now collect most of the data used by commands.push(). Move away from ui.expandpath() and call ui.paths.getpath() to get a path instance. Some "pushing to" output was dropped as one test demonstrates. I believe the dropped message was redundant with the error message and the change to be acceptable.
Sat, 08 Aug 2015 00:16:02 -0700 ui: move URL and path detection into path API
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:16:02 -0700] rev 26056
ui: move URL and path detection into path API ui.expandpath() has code for recognizing URLs or local filesystem paths. Our goal is to use ``path`` class instances everywhere a path is represented. Changing ui.expandpath() to return path instances is a lot of work. Our goal is to slowly marginalize it by moving logic into the paths API and to convert callers to the paths API. Many callers of ui.expandpath() pass in a value that could be a local filesystem path or URI. We move the detection of these strings from ui.expandpath() to paths.getpath() and path.__init__(). To do this properly in a way that is compatible with future callers, we need to parse the "#branch" syntax out of locations. This is a bit complicated, but it is necessary. The code for URL parsing is essentially a copy of hg.parseurl(). Once all consumers are speaking the paths API, it is likely that this function won't be called any more and it can be deleted.
Fri, 14 Aug 2015 15:52:19 +0900 reachableroots: return list of revisions instead of set
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 15:52:19 +0900] rev 26055
reachableroots: return list of revisions instead of set Now we don't need a set of reachable revisions, and the caller wants a sorted list of revisions, so constructing a set is just a waste of time. revset #0: 0::tip 2) 0.002536 3) 0.001598 63% PyList_New() should set an appropriate exception on error, so we don't need to call PyErr_NoMemory() manually. This patch lacks error handling of PyList_Append() as it was before for PySet_Add(). It should be fixed later.
Fri, 14 Aug 2015 15:49:11 +0900 reachableroots: use internal "revstates" array to test if rev is reachable
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 15:49:11 +0900] rev 26054
reachableroots: use internal "revstates" array to test if rev is reachable This is faster than using PySet_Contains(). revset #0: 0::tip 1) 0.003678 2) 0.002536 68%
Fri, 14 Aug 2015 15:43:29 +0900 reachableroots: use internal "revstates" array to test if rev is a root
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 15:43:29 +0900] rev 26053
reachableroots: use internal "revstates" array to test if rev is a root The main goal of this patch series is to reduce the use of PyXxx() function that is likely to require ugly error handling and inc/decref. Plus, this is faster than using PySet_Contains(). revset #0: 0::tip 0) 0.004168 1) 0.003678 88% This patch ignores out-of-range roots as they are in the pure implementation. Because reachable sets are calculated from heads, and out-of-range heads raise IndexError, we can just take out-of-range roots as unreachable. Otherwise, the test of "hg log -Gr '. + wdir()'" would fail. "heads" argument is changed to a list. Should we have to rename the C function as its signature is changed?
Tue, 18 Aug 2015 16:40:10 -0400 parsers: set exception when there's too little string data to extract parents
Augie Fackler <augie@google.com> [Tue, 18 Aug 2015 16:40:10 -0400] rev 26052
parsers: set exception when there's too little string data to extract parents Previously we were returning NULL from this function without actually setting up an exception. This fixes that problem, which was detected with cpychecker.
Tue, 18 Aug 2015 16:39:26 -0400 parsers: drop spurious check of readlen value
Augie Fackler <augie@google.com> [Tue, 18 Aug 2015 16:39:26 -0400] rev 26051
parsers: drop spurious check of readlen value We're about to check if len < 40 after assigning readlen to len, which means that if len < 40 we'll still abort, but I'm about to add a sensible exception to that failure, so let's just discard this useless check.
Tue, 18 Aug 2015 16:32:41 -0400 pathencode: check result of .digest() method in sha1hash
Augie Fackler <augie@google.com> [Tue, 18 Aug 2015 16:32:41 -0400] rev 26050
pathencode: check result of .digest() method in sha1hash Without this it was theoretically possible .digest() would fail and return NULL but we wouldn't notice. Detected with cpychecker.
Tue, 18 Aug 2015 16:43:26 -0400 parsers: correctly decref normed value after PyDict_SetItem
Augie Fackler <augie@google.com> [Tue, 18 Aug 2015 16:43:26 -0400] rev 26049
parsers: correctly decref normed value after PyDict_SetItem Previously we were leaving this PyObject* with a refcount that was one too high. Detected with cpychecker.
Tue, 18 Aug 2015 17:15:04 -0400 parsers: fix two leaks in index_ancestors
Augie Fackler <augie@google.com> [Tue, 18 Aug 2015 17:15:04 -0400] rev 26048
parsers: fix two leaks in index_ancestors Both happy paths through this function leaked the returned list: 1) If the list was of size 0 or 1, it was retained an extra time and then returned. 2) If the list was passed to find_deepest, it was never released before exiting this function. Both paths spotted by cpychecker.
Tue, 18 Aug 2015 18:38:56 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 18 Aug 2015 18:38:56 -0500] rev 26047
merge with stable
Tue, 18 Aug 2015 18:37:50 -0500 merge with i18n stable
Matt Mackall <mpm@selenic.com> [Tue, 18 Aug 2015 18:37:50 -0500] rev 26046
merge with i18n
Thu, 13 Aug 2015 16:50:05 -0300 i18n-pt_BR: synchronized with d14590f90cb6 stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Thu, 13 Aug 2015 16:50:05 -0300] rev 26045
i18n-pt_BR: synchronized with d14590f90cb6
Fri, 14 Aug 2015 15:30:52 +0900 reachableroots: extend "revstates" to array of bit flags
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 15:30:52 +0900] rev 26044
reachableroots: extend "revstates" to array of bit flags
Fri, 14 Aug 2015 15:23:42 +0900 reachableroots: rename "seen" array to "revstates" for future extension
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 15:23:42 +0900] rev 26043
reachableroots: rename "seen" array to "revstates" for future extension It will be an array of bit flags, SEEN | ROOT | REACHABLE.
Sat, 15 Aug 2015 18:29:58 +0900 reachableroots: give anonymous name to short-lived "numheads" variable
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Aug 2015 18:29:58 +0900] rev 26042
reachableroots: give anonymous name to short-lived "numheads" variable I'll reuse it for the length of the roots list.
Sat, 15 Aug 2015 18:03:47 +0900 reachableroots: reduce nesting level by jumping to next iteration by continue
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Aug 2015 18:03:47 +0900] rev 26041
reachableroots: reduce nesting level by jumping to next iteration by continue This can eliminate lines over 80 columns. No code change except for the outermost "if" condition.
Mon, 17 Aug 2015 19:03:58 -0400 test-convert-git: work around output format changes in git stable
Augie Fackler <augie@google.com> [Mon, 17 Aug 2015 19:03:58 -0400] rev 26040
test-convert-git: work around output format changes in git git version 2.4.3: --- /home/augie/hg/tests/test-convert-git.t +++ /home/augie/hg/tests/test-convert-git.t.err @@ -659,7 +659,7 @@ $ touch a && git add a && git commit -am "commit a" [master (root-commit) 8ae5f69] commit a Author: nottest <test@example.org> 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 a $ cd .. $ git clone git-repo7 git-repo7-client git version 1.7.9.5: --- /home/augie/hg/tests/test-convert-git.t +++ /home/augie/hg/tests/test-convert-git.t.err @@ -659,7 +659,7 @@ $ touch a && git add a && git commit -am "commit a" [master (root-commit) 8ae5f69] commit a Author: nottest <test@example.org> - 1 file changed, 0 insertions(+), 0 deletions(-) + 0 files changed create mode 100644 a $ cd .. $ git clone git-repo7 git-repo7-client I don't know when this changed in git and am too lazy to try and bisect it, so just work around the change.
Mon, 17 Aug 2015 22:56:12 -0400 histedit: correct spelling etc in more comments
Augie Fackler <augie@google.com> [Mon, 17 Aug 2015 22:56:12 -0400] rev 26039
histedit: correct spelling etc in more comments Spotted during review of another patch.
Fri, 31 Jul 2015 12:54:16 -0700 histedit: add a missing "s" in a comment
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 31 Jul 2015 12:54:16 -0700] rev 26038
histedit: add a missing "s" in a comment
Fri, 14 Aug 2015 15:22:47 -0700 convert: fix convert dropping p2 contents during filemap merge
Durham Goode <durham@fb.com> [Fri, 14 Aug 2015 15:22:47 -0700] rev 26037
convert: fix convert dropping p2 contents during filemap merge When converting a merge commit using a filemap convert (i.e. when moving contents from the root of the repo into subdir1/), convert would silently drop the entire contents of the target repo's p2. This was because when it built the target commit, it did so by taking the target p1 and adding only the files that changed in the source repo's merge commit. This breaks in the case where the target repo has files that are unrelated to the source repo (like in the case where you use convert to import a repo as a subdirectory of another). The fix is to use Mercurial's merge logic to detect which files in p2 we should carry over to the merge. It follows three rules: 1) if the file belongs to the source, don't try to merge it. Rely on the list of files provided to putcommit to be correct. 2) if the file requires merging or user input (change vs deleted), throw an exception. We don't have enough info to do this. 3) if p2 has the newest, non-merge-requiring version of the file, take it I've also added a test to cover this issue.
Sat, 15 Aug 2015 13:46:30 -0700 convert: implements targetfilebelongstosource for filemap source
Durham Goode <durham@fb.com> [Sat, 15 Aug 2015 13:46:30 -0700] rev 26036
convert: implements targetfilebelongstosource for filemap source This is an implementation of the new targetfilebelongstosource() function for the filemapper. It simply checks if the given file name is prefixed by any of the rename destinations. It is not a perfect implementation since it doesn't account for the filemap specifying includes or excludes, but that makes the problem much harder, and this implementation should suffice for most cases.
Sat, 15 Aug 2015 13:44:55 -0700 convert: add function to test if file is from source
Durham Goode <durham@fb.com> [Sat, 15 Aug 2015 13:44:55 -0700] rev 26035
convert: add function to test if file is from source This adds a base implementation of a function that tests if a given file from a target repo came from the source repo. This will be used later to detect which files did not come from the source repo during a merge, so we can merge those files correctly instead of dropping them.
Sat, 15 Aug 2015 17:50:59 +0900 revsetbenchmarks: run make after update so that C extensions are built
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Aug 2015 17:50:59 +0900] rev 26034
revsetbenchmarks: run make after update so that C extensions are built
Fri, 14 Aug 2015 12:36:41 +0900 reachableroots: fix memleak of integer objects at includepath loop
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 12:36:41 +0900] rev 26033
reachableroots: fix memleak of integer objects at includepath loop In the first visit loop, val is decref-ed correctly after PySet_Add(). Let's do the same for the includepath loop.
Fri, 14 Aug 2015 12:31:56 +0900 reachableroots: bail if integer object cannot be allocated
Yuya Nishihara <yuya@tcha.org> [Fri, 14 Aug 2015 12:31:56 +0900] rev 26032
reachableroots: bail if integer object cannot be allocated This patch also replaces Py_XDECREF() by Py_DECREF() because we known "val" and "p" are not NULL. BTW, we can eliminate some of these allocation and error handling of int objects if the internal "seen" array has more information. For example, enum { SEEN = 1, ROOT = 2, REACHABLE = 4 }; /* ... build ROOT mask from roots argument ... */ if (seen[revnum + 1] & ROOT) { /* instead of PySet_Contains(roots, val) */ >From my quick hack, it is 2x faster.
Sat, 01 Aug 2015 05:43:39 -0700 devel-warn: issue a warning when writing bookmarks without holding the wlock
Laurent Charignon <lcharignon@fb.com> [Sat, 01 Aug 2015 05:43:39 -0700] rev 26031
devel-warn: issue a warning when writing bookmarks without holding the wlock I saw an issue in an extension that we develop where we were writing bookmarks without holding the wlock. Another extension was taking a lock at the same time and wiped out the bookmarks we were about to write. This patch adds a devel-warning to urge people to fix their invalid code.
Thu, 13 Aug 2015 19:37:47 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 13 Aug 2015 19:37:47 -0500] rev 26030
merge with stable
Tue, 11 Aug 2015 16:45:11 -0700 rebase: lock the repo during the full rebase operation stable
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 11 Aug 2015 16:45:11 -0700] rev 26029
rebase: lock the repo during the full rebase operation Running `hg pull --rebase` would move bookmarks without any repository locking. So we now lock the repository. For good measure and avoiding sneaky race conditions, we lock the repository for the whole operation. There is no code change besides the indentation.
Tue, 11 Aug 2015 16:26:12 -0700 update: wlock the repo for the whole 'hg update' command stable
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 11 Aug 2015 16:26:12 -0700] rev 26028
update: wlock the repo for the whole 'hg update' command The update command is touching the repository and should lock it for the length of its operations. Equally importantly, it should lock the repository when it is writing bookmarks. It wasn't doing so until now, leaving doors open for all kinds of drunk beaver parties. This results in some minor tests changes, and the fixing of a couple of bugs from race conditions. Code does not receive any changes beside extra indentation.
(0) -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 +10000 tip