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.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip