Wed, 08 Jul 2015 17:01:09 +0900 context: write dirstate out explicitly after marking files as clean
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Jul 2015 17:01:09 +0900] rev 25753
context: write dirstate out explicitly after marking files as clean To detect change of a file without redundant comparison of file content, dirstate recognizes a file as certainly clean, if: (1) it is already known as "normal", (2) dirstate entry for it has valid (= not "-1") timestamp, and (3) mode, size and timestamp of it on the filesystem are as same as ones expected in dirstate This works as expected in many cases, but doesn't in the corner case that changing a file keeps mode, size and timestamp of it on the filesystem. The timetable below shows steps in one of typical such situations: ---- ----------------------------------- ---------------- timestamp of "f" ---------------- dirstate file- time action mem file system ---- ----------------------------------- ---- ----- ----- N -1 *** - make file "f" clean N - execute 'hg foobar' - instantiate 'dirstate' -1 -1 - 'dirstate.normal("f")' N -1 (e.g. via dirty check) - change "f", but keep size N N+1 - release wlock - 'dirstate.write()' N N - 'hg status' shows "f" as "clean" N N N ---- ----------------------------------- ---- ----- ----- The most important point is that 'dirstate.write()' is executed at N+1 or later. This causes writing dirstate timestamp N of "f" out successfully. If it is executed at N, 'parsers.pack_dirstate()' replaces timestamp N with "-1" before actual writing dirstate out. Occasional test failure for unexpected file status is typical example of this corner case. Batch execution with small working directory is finished in no time, and rarely satisfies condition (2) above. This issue can occur in cases below; - 'hg revert --rev REV' for revisions other than the parent - failure of 'merge.update()' before 'merge.recordupdates()' The root cause of this issue is that files are changed without flushing in-memory dirstate changes via 'repo.commit()' (even though omitting 'dirstate.normallookup()' on changed files also causes this issue). To detect changes of files correctly, this patch writes in-memory dirstate changes out explicitly after marking files as clean in 'workingctx._checklookup()', which is invoked via 'repo.status()'. After this change, timetable is changed as below: ---- ----------------------------------- ---------------- timestamp of "f" ---------------- dirstate file- time action mem file system ---- ----------------------------------- ---- ----- ----- N -1 *** - make file "f" clean N - execute 'hg foobar' - instantiate 'dirstate' -1 -1 - 'dirstate.normal("f")' N -1 (e.g. via dirty check) ----------------------------------- ---- ----- ----- - 'dirsttate.write()' -1 -1 ----------------------------------- ---- ----- ----- - change "f", but keep size N N+1 - release wlock - 'dirstate.write()' -1 -1 - 'hg status' -1 -1 N ---- ----------------------------------- ---- ----- ----- To reproduce this issue in tests certainly, this patch emulates some timing critical actions as below: - timestamp of "f" in '.hg/dirstate' is -1 at the beginning 'hg debugrebuildstate' before command invocation ensures it. - make file "f" clean at N - change "f" at N 'touch -t 200001010000' before and after command invocation changes mtime of "f" to "2000-01-01 00:00" (= N). - invoke 'dirstate.write()' via 'repo.status()' at N 'fakedirstatewritetime.py' forces 'pack_dirstate()' to use "2000-01-01 00:00" as "now", only if 'pack_dirstate()' is invoked via 'workingctx._checklookup()'. - invoke 'dirstate.write()' via releasing wlock at N+1 (or "not at N") 'pack_dirstate()' via releasing wlock uses actual timestamp at runtime as "now", and it should be different from the "2000-01-01 00:00" of "f". BTW, this patch also changes 'test-largefiles-misc.t', because adding 'dirstate.write()' makes recent dirstate changes visible to external process.
Wed, 08 Jul 2015 17:01:09 +0900 tests: add extension to emulate invoking dirstate.write at the specific time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Jul 2015 17:01:09 +0900] rev 25752
tests: add extension to emulate invoking dirstate.write at the specific time This extension fakes 'now' for 'parsers.pack_dirstate()' to emulate invoking 'dirstate.write()' at the specific time, only when 'dirstate.write()' is invoked via functions below: - 'workingctx._checklookup()' (= 'repo.status()') - 'committablectx.markcommitted()' This is useful to reproduce timing critical issues fixed in subsequent patches.
Wed, 08 Jul 2015 18:05:27 +0100 convert: handle copies when converting from Perforce (issue4744)
Eugene Baranov <eug.baranov@gmail.com> [Wed, 08 Jul 2015 18:05:27 +0100] rev 25751
convert: handle copies when converting from Perforce (issue4744)
Wed, 08 Jul 2015 10:31:09 -0700 convert: add config for recording the source name
Durham Goode <durham@fb.com> [Wed, 08 Jul 2015 10:31:09 -0700] rev 25750
convert: add config for recording the source name This creates the convert.hg.sourcename config option which will embed a user defined name into each commit created by the convert. This is useful when using the convert extension to merge several repositories together and we want to record where each commit came from.
Wed, 08 Jul 2015 10:29:11 -0700 convert: support multiple specifed revs in git source
Durham Goode <durham@fb.com> [Wed, 08 Jul 2015 10:29:11 -0700] rev 25749
convert: support multiple specifed revs in git source This allows specifying multiple revs/branches to convert from a git repo.
Wed, 08 Jul 2015 10:27:43 -0700 convert: add support for specifying multiple revs
Durham Goode <durham@fb.com> [Wed, 08 Jul 2015 10:27:43 -0700] rev 25748
convert: add support for specifying multiple revs Previously convert could only take one '--rev'. This change allows the user to specify multiple --rev entries. For instance, this could allow converting multiple branches (but not all branches) at once from git. In this first patch, we disable support for this for all sources. Future patches will enable it for select sources (like git).
Mon, 06 Jul 2015 01:38:37 +0800 monoblue: use padding instead of position for text in footer
Anton Shestakov <av6@dwimlabs.net> [Mon, 06 Jul 2015 01:38:37 +0800] rev 25747
monoblue: use padding instead of position for text in footer Some installations alter monoblue style and remove margins from body element (these margins have that dark gray background) to adapt hgweb instance to an already existing site design. However, the margins hid a quirk in page footer: a block of text needlessly popped out of the footer, and when margins were gone, the whole page got a vertical scroll bar because of that. Live example: https://hg.prosody.im/prosody-modules/ To remove the potential scroll bar, this block of text now uses left padding, which doesn't make it overflow the footer, but makes it achieve the otherwise same result visually.
Mon, 06 Jul 2015 01:22:23 +0800 monoblue: don't try to show repo on hgwebdir index page
Anton Shestakov <av6@dwimlabs.net> [Mon, 06 Jul 2015 01:22:23 +0800] rev 25746
monoblue: don't try to show repo on hgwebdir index page Index page shows a list of accessible repositories, it doesn't have a single-repo context.
Fri, 03 Jul 2015 18:10:58 +0100 convert: handle deleted files when converting from Perforce (issue4743) stable
Eugene Baranov <eug.baranov@gmail.com> [Fri, 03 Jul 2015 18:10:58 +0100] rev 25745
convert: handle deleted files when converting from Perforce (issue4743)
Sun, 28 Sep 2014 00:49:36 -0700 bookmarks: change bookmark within a transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 00:49:36 -0700] rev 25744
bookmarks: change bookmark within a transaction For some time, bookmark can and should be moved in the transaction. This changeset migrates the 'hg bookmarks' commands to use a transaction. Tests regarding rollback and transaction hooks are impacted for obvious reasons. Some have to be slightly updated to keep testing the same things. Some can just be dropped because they do not make sense anymore.
Wed, 01 Jul 2015 01:09:57 -0700 bookmark: remove the "touch changelog" hack
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 01 Jul 2015 01:09:57 -0700] rev 25743
bookmark: remove the "touch changelog" hack Any changes to bookmarks used to touch the changelog to ensure hgweb was reloaded. This was fairly hacky and stops working when bookmarks are moved as part of the transaction. As hgweb is now explicitly tracking bookmark changes, we can remove this hack (and no tests break).
Mon, 29 Jun 2015 13:44:24 -0700 convert: add config option for disabling ancestor parent checks
Durham Goode <durham@fb.com> [Mon, 29 Jun 2015 13:44:24 -0700] rev 25742
convert: add config option for disabling ancestor parent checks When converting merge commits, convert checks if any of the parents are ancestors of any of the other parents. To do this, it builds an ancestor list for every commit in the repository. On large repos this can take a long time (30min+). Let's add an option for disabling this check to preserve performance. The downside of this is that it may create unnecessary parent connections when enabled (which is unfortunate, but not incorrect). To verify, I ran the convert tests with the flag enabled, and verified the graph changes were all just to add new parents that were ancestors of existing parents.
Mon, 29 Jun 2015 13:40:20 -0700 convert: add config to not convert tags
Durham Goode <durham@fb.com> [Mon, 29 Jun 2015 13:40:20 -0700] rev 25741
convert: add config to not convert tags In some cases we do not want to convert tags from the source repo to be tags in the target repo (for instance, in a large repository, hgtags cause scaling issues so we want to avoid them). This adds a config option to disable converting tags.
Thu, 02 Jul 2015 22:18:21 +0900 templatekw: make {rev} return wdirrev instead of None
Yuya Nishihara <yuya@tcha.org> [Thu, 02 Jul 2015 22:18:21 +0900] rev 25740
templatekw: make {rev} return wdirrev instead of None wdirrev/wdirnode identifiers are still experimental, but {node} is mapped to wdirnode. So {rev} should do the same for consistency. I'm not sure if templatekw can import scmutil. If not, we should move intrev() to node module.
Thu, 02 Jul 2015 22:03:06 +0900 changeset_printer: use node.wdirrev to calculate meaningful parentrevs
Yuya Nishihara <yuya@tcha.org> [Thu, 02 Jul 2015 22:03:06 +0900] rev 25739
changeset_printer: use node.wdirrev to calculate meaningful parentrevs Because we defined the working-directory revision is INT_MAX, it makes sense that "hg log -r 'wdir()'" displays the "parent:" field. This is the same for two revisions that are semantically contiguous but the intermediate revisions are hidden.
(0) -10000 -3000 -1000 -300 -100 -15 +15 +100 +300 +1000 +3000 +10000 tip