Thu, 22 Dec 2016 23:28:11 -0700 convert: add config option to copy extra keys from Git commits
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 22 Dec 2016 23:28:11 -0700] rev 30663
convert: add config option to copy extra keys from Git commits Git commit objects support storing arbitrary key-value metadata. While there is no user-facing mechanism in Git to record these values, some tools do record data here. Currently, `hg convert` only handles the "author," "committer," and "parent" keys in Git commit objects. All other keys are ignored. This means that any custom keys are lost when converting Git repos to Mercurial. This patch implements support for copying a whitelist of extra keys from Git commit objects to the "extras" dict of the destination. As the added tests demonstate, this allows extra metadata to be preserved during the conversion process. This patch stops short of converting all metadata to "extras." We could potentially implement this via `convert.git.extrakeys=*` or similar. But copying everything by default is a bit dangerous because if Git adds new keys to commit objects, we could find ourselves copying things that shouldn't be copied! This patch also assumes the source key is the same as the destination key. We could implement support for prefixing the output key to distinguish it as coming from Git. But until this feature is needed, I'm inclined to hold off implementing it.
Thu, 22 Dec 2016 09:26:47 -0800 convert: don't use {} as default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 22 Dec 2016 09:26:47 -0800] rev 30662
convert: don't use {} as default argument value This is a common Python gotcha. I'm kinda surprised we don't have a check-code to detect this :/
Thu, 22 Dec 2016 19:08:38 -0500 documentation: better censor flag documentation
Remi Chaintron <remi@fb.com> [Thu, 22 Dec 2016 19:08:38 -0500] rev 30661
documentation: better censor flag documentation
Sat, 24 Dec 2016 10:40:08 -0700 tests: make test-convert-git.t reproducible
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Dec 2016 10:40:08 -0700] rev 30660
tests: make test-convert-git.t reproducible For reasons I can't explain, Git's copy detection code was identifying different source files on OS X and (presumably) Solaris versus Linux (which the test was originally authored against). This was causing unstable test output. Changing the test to use a non-ambiguous source file appears to make the test stable. The test was introduced recently in ea3540e66fd8.
Thu, 22 Dec 2016 11:22:32 -0800 fsmonitor: refresh pywatchman to upstream
Zack Hricz <zphricz@fb.com> [Thu, 22 Dec 2016 11:22:32 -0800] rev 30659
fsmonitor: refresh pywatchman to upstream Update to upstream to version c77452. The refresh includes fixes to improve windows compatibility. There is a minor update to 'test-check-py3-compat.t' as c77452 no longer have the py3 compatibility issues the previous version had. # no-check-commit
Thu, 22 Dec 2016 11:07:59 -0800 tests: exclude bundled pywatchman from test-check-pyflakes
Zack Hricz <zphricz@fb.com> [Thu, 22 Dec 2016 11:07:59 -0800] rev 30658
tests: exclude bundled pywatchman from test-check-pyflakes The code under pywatchman used to be excluded from test-check-code and test-check-pyflakes through the magic string "no-check-code". Now that test-check-code excludes the pywatchman directory entirely, the directory should also be excluded from test-check-pyflakes.
Fri, 18 Nov 2016 18:18:15 +0100 color: load 'colortable' from extension using an 'extraloader'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Nov 2016 18:18:15 +0100] rev 30657
color: load 'colortable' from extension using an 'extraloader' Now that we have the '_style' dictionary in core, we can use the clean and standard 'extraloader' mechanism to load extension's 'colortable'. color.loadcolortable
Fri, 18 Nov 2016 18:09:36 +0100 color: move hgext.color._styles to mercurial.color.style
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Nov 2016 18:09:36 +0100] rev 30656
color: move hgext.color._styles to mercurial.color.style This is small first step to start moving the color infrastructure into core. The current code of the color extensions is full of strange and debatable things, we'll clean it up in the process as having things into core help the cleaning. Moving _style was the simplest sensible move that is possible. It will also help cleaning up the extension setup process in a later changesets.
Fri, 18 Nov 2016 18:29:19 +0100 color: drop use of the 'global' keyword for '_style'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Nov 2016 18:29:19 +0100] rev 30655
color: drop use of the 'global' keyword for '_style' Using 'global' is usually a bad sign. Here it is used so that one can empty the content of a dict at the global scope. We '_style.clear()' and drop the global.
Fri, 18 Nov 2016 18:27:13 +0100 color: drop use of the 'global' keyword for _terminfo_params
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Nov 2016 18:27:13 +0100] rev 30654
color: drop use of the 'global' keyword for _terminfo_params Using 'global' is usually a bad sign. Here it is used so that one can empty the content of a dict at the global scope. We '_terminfo_params.clear()' and drop the global.
Wed, 21 Dec 2016 13:51:34 -0800 fsmonitor: fix exception message scraping
zphricz <zack.hricz@oculus.com> [Wed, 21 Dec 2016 13:51:34 -0800] rev 30653
fsmonitor: fix exception message scraping pywatchman.CommandError formats its error message such that 'unable to resolve root' is not a prefix. This change fixes that by instead just searching for it as a substring.
Wed, 21 Dec 2016 13:44:15 -0800 tests: add magic string to bypass check-commit
David Soria Parra <davidsp@fb.com> [Wed, 21 Dec 2016 13:44:15 -0800] rev 30652
tests: add magic string to bypass check-commit Allow bypassing test-check-commit runs by specifying '# no-check-commit' in the description. This should be avoided but is useful for upstream imports such as pywatchman which will cause check-code to fail otherwise.
Sun, 18 Dec 2016 12:53:20 -0800 convert: config option for git rename limit
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 18 Dec 2016 12:53:20 -0800] rev 30651
convert: config option for git rename limit By default, Git applies rename and copy detection to 400 files. The diff.renamelimit config option and -l argument to diff commands can override this. As part of converting some repositories in the wild, I was hitting the default limit. Unfortunately, the warnings that Git prints in this scenario are swallowed because the process running functionality in common.py redirects stderr to /dev/null by default. This seems like a bug, but a bug for another day. This commit establishes a config option to send the rename limit through to `git diff-tree`. The added tests demonstrate a too-low rename limit doesn't result in copy metadata being recorded.
Thu, 22 Dec 2016 01:09:45 +0900 chgserver: backout changeset dfb19aed409e (per discussion)
Yuya Nishihara <yuya@tcha.org> [Thu, 22 Dec 2016 01:09:45 +0900] rev 30650
chgserver: backout changeset dfb19aed409e (per discussion) On Wed, 21 Dec 2016 15:39:05 +0000, Jun Wu wrote: > Actually, patch 1 is unnecessary if we go with the "ui._runpager" approach. > Maybe someone can drop it without adding too many markers.
Fri, 16 Dec 2016 14:48:37 +0000 chgserver: override runcommand
Jun Wu <quark@fb.com> [Fri, 16 Dec 2016 14:48:37 +0000] rev 30649
chgserver: override runcommand Next patches will customize chgserver's runcommand. So let's override it. The docstring is temporarily missing and will be filled later.
Fri, 16 Dec 2016 14:46:34 +0000 chgserver: store csystem separately
Jun Wu <quark@fb.com> [Fri, 16 Dec 2016 14:46:34 +0000] rev 30648
chgserver: store csystem separately Previously, the "system" channel is inside the ui object. In the future, chg will let dispatch to create a new ui object from scratch, to maximize compatibility. And chgserver will use a "uisetup" like an extension to wrap ui.system. To be able to do that cleanly, the system channel needs to be accessed directly.
Mon, 19 Dec 2016 02:26:41 +0530 py3: replace sys.platform with pycompat.sysplatform (part 2 of 2)
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Dec 2016 02:26:41 +0530] rev 30647
py3: replace sys.platform with pycompat.sysplatform (part 2 of 2)
Mon, 19 Dec 2016 02:15:24 +0530 py3: replace sys.platform with pycompat.sysplatform (part 1 of 2)
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Dec 2016 02:15:24 +0530] rev 30646
py3: replace sys.platform with pycompat.sysplatform (part 1 of 2) sys.platform returns unicode on python 3 world. Our code base has most of the things bytes because of the transformer. So we have a bytes version of this as pycompat.sysplatform. This series of 2 patches replaces occurences of sys.platform with pycompat.sysplatform.
Mon, 19 Dec 2016 00:28:12 +0530 py3: replace os.name with pycompat.osname (part 2 of 2)
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Dec 2016 00:28:12 +0530] rev 30645
py3: replace os.name with pycompat.osname (part 2 of 2)
Mon, 19 Dec 2016 00:16:52 +0530 py3: replace os.name with pycompat.osname (part 1 of 2)
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Dec 2016 00:16:52 +0530] rev 30644
py3: replace os.name with pycompat.osname (part 1 of 2) os.name returns unicodes on py3 and we have pycompat.osname which returns bytes. This series of 2 patches will change every ocurrence of os.name with pycompat.osname.
Sun, 18 Dec 2016 02:08:59 +0530 py3: replace os.environ with encoding.environ (part 5 of 5)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 02:08:59 +0530] rev 30643
py3: replace os.environ with encoding.environ (part 5 of 5)
Sun, 18 Dec 2016 02:06:00 +0530 py3: replace os.environ with encoding.environ (part 4 of 5)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 02:06:00 +0530] rev 30642
py3: replace os.environ with encoding.environ (part 4 of 5)
Sun, 18 Dec 2016 01:54:36 +0530 py3: replace os.environ with encoding.environ (part 3 of 5)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 01:54:36 +0530] rev 30641
py3: replace os.environ with encoding.environ (part 3 of 5)
Sun, 18 Dec 2016 01:46:39 +0530 py3: replace os.environ with encoding.environ (part 2 of 5)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 01:46:39 +0530] rev 30640
py3: replace os.environ with encoding.environ (part 2 of 5)
Sun, 18 Dec 2016 01:34:41 +0530 py3: replace os.environ with encoding.environ (part 1 of 5)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 01:34:41 +0530] rev 30639
py3: replace os.environ with encoding.environ (part 1 of 5) os.environ is a dictionary which has string elements on Python 3. We have encoding.environ which take care of all these things. This is the first patch of 5 patch series which tend to replace the occurences of os.environ with encoding.environ as using os.environ will result in unusual behaviour.
Tue, 20 Dec 2016 20:28:41 -0800 tests: exclude bundled pywatchman from check-code test
David Soria Parra <davidsp@fb.com> [Tue, 20 Dec 2016 20:28:41 -0800] rev 30638
tests: exclude bundled pywatchman from check-code test pywatchman is imported from upstream and therefore fails to pass linting. We have added 'no-check-code' manually to every file in the past. This is cumbersome and modifies upstream sources.
Tue, 20 Dec 2016 09:23:50 -0800 convert: parse perforce data on-demand
David Soria Parra <davidsp@fb.com> [Tue, 20 Dec 2016 09:23:50 -0800] rev 30637
convert: parse perforce data on-demand We are using read-only attributes that parse the perforce data on demand. We are reading the data only once whenever an attribute is requested and use it throughout the import process. This is equivalent to the previous behavior, but we are avoiding reading from perforce when we initialize the object, but instead run it during the actual import process, when the first attribute is requested (usually getheads(), see `convertcmd.convert`).
Tue, 20 Dec 2016 09:23:50 -0800 convert: return calculated values from parse() instead of manpulating state
David Soria Parra <davidsp@fb.com> [Tue, 20 Dec 2016 09:23:50 -0800] rev 30636
convert: return calculated values from parse() instead of manpulating state
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 +10000 tip