Sun, 25 Dec 2016 23:32:11 +0000 chg: handle connect failure before errno gets overridden
Jun Wu <quark@fb.com> [Sun, 25 Dec 2016 23:32:11 +0000] rev 30679
chg: handle connect failure before errno gets overridden This patch moves the error handling logic up so that errno after connect won't be overridden.
Sun, 25 Dec 2016 03:06:55 +0530 py3: have a bytes version of shlex.split()
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 25 Dec 2016 03:06:55 +0530] rev 30678
py3: have a bytes version of shlex.split() shlex.split() only accepts unicodes on Python 3. After this patch we will be using pycompat.shlexsplit(). This patch also replaces existing occurences of shlex.split with pycompat.shlexsplit.
Fri, 23 Dec 2016 16:26:40 +0000 chg: support long socket path
Jun Wu <quark@fb.com> [Fri, 23 Dec 2016 16:26:40 +0000] rev 30677
chg: support long socket path This patch replaces UNIX_PATH_MAX (108) with PATH_MAX (4096) so we can have long unix path.
Fri, 23 Dec 2016 16:16:44 +0000 chg: remove sockdirfd
Jun Wu <quark@fb.com> [Fri, 23 Dec 2016 16:16:44 +0000] rev 30676
chg: remove sockdirfd See the previous patch for the reason.
Fri, 23 Dec 2016 16:37:00 +0000 chg: let hgc_open support long path
Jun Wu <quark@fb.com> [Fri, 23 Dec 2016 16:37:00 +0000] rev 30675
chg: let hgc_open support long path "sizeof(sun_path)" is too small. Use the chdir trick to support long socket path, like "mercurial.util.bindunixsocket". It's useful for cases where TMPDIR is long. Modern OS X rewrites TMPDIR to a long value. And we probably want to use XDG_RUNTIME_DIR [2] for Linux. The approach is a bit different from the previous plan, where we will have hgc_openat and pass cmdserveropts.sockdirfd to it. That's because the current change is easier: chg has to pass a full path to "hg" as the "--address" parameter. There is no "--address-basename" or "--address-dirfd" flags. The next patch will remove "sockdirfd". Note: It'd be nice if we can use a native "connectat" implementation. However, that's not available everywhere. Some platform (namely FreeBSD) does support it, but the implementation has bugs so it cannot be used [2]. [1]: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html [2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-April/082892.html
Sat, 24 Dec 2016 15:38:27 -0500 rebase: un-wrap function signature since it fits in 80 columns
Augie Fackler <raf@durin42.com> [Sat, 24 Dec 2016 15:38:27 -0500] rev 30674
rebase: un-wrap function signature since it fits in 80 columns
Sun, 25 Dec 2016 02:42:46 +0530 py3: exclude pywatchman from test-check-py3-compat.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 25 Dec 2016 02:42:46 +0530] rev 30673
py3: exclude pywatchman from test-check-py3-compat.t Exclude pywatchman from py3 test. They have already worked on Python 3 compatibility https://github.com/facebook/watchman/pull/247
Sun, 25 Dec 2016 02:34:19 +0530 py3: update test-check-py3-compat.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 25 Dec 2016 02:34:19 +0530] rev 30672
py3: update test-check-py3-compat.t This part of test runs only on py3. This change was introduced by 16f4b341288d.
Thu, 22 Dec 2016 19:35:30 +0530 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 22 Dec 2016 19:35:30 +0530] rev 30671
shelve: choose a legal shelve name when no name is passed (issue5112) Currently if our branch name contains '\' or starts with '.', shelve chooses an illegal shelve name. This behaviour is not good as it itself is choosing something which it won't accept further. We can raise errors if user passes a name which is illegal. After this patch, if '\' is contained in branch name or bookmark name, it will be replaced by '_' while choosing a shelve name and if they starts with '.', the first '.' is replaced by '_'.
Thu, 22 Dec 2016 23:27:32 +0530 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 22 Dec 2016 23:27:32 +0530] rev 30670
shelve: add tests to ensure illegal shelve names are avoided We avoid '.' as the first letter of shelve name so that we don't create hidden file. We also avoid slashes in name so that we don't form a new directory
Tue, 20 Dec 2016 00:20:07 +0530 py3: replace sys.executable with pycompat.sysexecutable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 20 Dec 2016 00:20:07 +0530] rev 30669
py3: replace sys.executable with pycompat.sysexecutable sys.executable returns unicodes on Python 3. This patch replaces occurences of sys.executable with pycompat.sysexecutable.
Tue, 20 Dec 2016 00:02:24 +0530 py3: have bytes version of sys.executable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 20 Dec 2016 00:02:24 +0530] rev 30668
py3: have bytes version of sys.executable sys.executable on Python 3 returns unicodes and we want bytes. So this patch adds a new pycompat.sysexecutable which returns bytes by encoding using os.fsencode() since it is path variable.
Thu, 22 Dec 2016 01:54:17 +0530 py3: use pycompat.getcwd instead of os.getcwd
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 22 Dec 2016 01:54:17 +0530] rev 30667
py3: use pycompat.getcwd instead of os.getcwd
Wed, 21 Dec 2016 23:40:38 +0530 py3: use python 3 compatible variables in hgext/fsmontor/__init__.py
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 21 Dec 2016 23:40:38 +0530] rev 30666
py3: use python 3 compatible variables in hgext/fsmontor/__init__.py Earlier this was left thinking that its part of pywatchman package. This patch replaces variables os.sep, sys.platform and os.envrion with their py3 compatible ones.
Wed, 21 Dec 2016 22:42:31 +0530 py3: add warnings in check-code related to py3
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 21 Dec 2016 22:42:31 +0530] rev 30665
py3: add warnings in check-code related to py3 We have our own bytes versions of things like, getopt.getopt, os.sep, os.name, sys.executable, os.environ and few more for python 3 portability. Its better to come up with warnings if someone breaks the things which we have fixed. After this patch, check-code will warn us to use our bytes version. These checks run on mercurial/ and hgext/ and pycompat.py is excluded.
Mon, 19 Dec 2016 02:54:49 +0530 py3: replace os.getenv with pycompat.osgetenv
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Dec 2016 02:54:49 +0530] rev 30664
py3: replace os.getenv with pycompat.osgetenv os.getenv deals with unicodes on Python 3, so we have pycompat.osgetenv to deal with bytes. This patch replaces occurrences on os.getenv with pycompat.osgetenv
Mon, 19 Dec 2016 02:35:38 +0530 py3: have bytes version of os.getenv
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Dec 2016 02:35:38 +0530] rev 30663
py3: have bytes version of os.getenv os.getenv() on python 3 deals with unicodes. If we want to pass bytes. we have os.getenvb() which deals with bytes. This patch adds up a pycompat.osgetenv which deals with bytes on both python 2 and 3.
Sat, 24 Dec 2016 01:16:14 +0530 url: remove unnecessary deletion of environ variables while dealing with proxy
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Dec 2016 01:16:14 +0530] rev 30662
url: remove unnecessary deletion of environ variables while dealing with proxy Currently we delete proxy environment variables if ui.config contains proxy values. This is unnecessary because urllib2.ProxyHandler class only reads proxy from environment it is initialised by None. But url.py never passes None, so there is no point urllib2 will take environment variables in account. This also prevents deleting environment variables which is not safe. This code was introduced while resolving Bug 2451 even it is in one of comments (sixth one) on bug that we can safely remove this part. Link to bug : https://bz.mercurial-scm.org/show_bug.cgi?id=2451
Thu, 22 Dec 2016 23:28:35 -0700 convert: add config option to control storing original revision
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 22 Dec 2016 23:28:35 -0700] rev 30661
convert: add config option to control storing original revision common.commit.__init__ sets saverev=True by default. The side effect of this is that the hg sink will always set the "convert_revision" extras key to the commit being converted. This patch adds a config option to disable this behavior. While most consumers will want "convert_revision" to be a) written b) with the exact Git commit that was converted, some have use cases that prefer otherwise. In my case, I am performing significant rewrites of a Git repository *before* it is fed into `hg convert`. I have to do this because `hg convert` does not easily support the kind of transform I desire, even with extensions. (For the curious, I am "linearizing" the history of a GitHub repo by removing merge commits which add little value to the final history. It isn't easy to do this during `hg convert` because of Mercurial's file copy/rename metadata requirements.) In my scenario, my pre-convert transform stores a "convert_revision" key in the Git commit object containing the original Git commit ID. I want this original Git commit ID carried forward to Mercurial. By disabling the setting of this extra during `hg convert` and copying the value from the Git commit object, I can have the final "convert_revision" extra key contain the original Git commit ID. An added test verifies this exact scenario. This feature could likely be implemented for other VCS sources. But until someone needs the feature, I'm inclined to hold off implementing.
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 30660
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 30659
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 30658
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 30657
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 30656
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 30655
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.
Thu, 22 Dec 2016 23:14:13 +0900 posix: make poll() restart on interruption by signal (issue5452) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 22 Dec 2016 23:14:13 +0900] rev 30654
posix: make poll() restart on interruption by signal (issue5452) select() is a notable example of syscalls which may fail with EINTR. If we had a SIGWINCH handler installed, ssh would crash when the terminal window was resized. This patch fixes the problem.
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 30653
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 30652
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 30651
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 30650
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.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip