From 138ed0c78fb9e0981cda3f3ba3e0b2d89728ab2a Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 20 Mar 2017 19:44:46 +0000 Subject: www-client/arcanist: Version bump Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- www-client/arcanist/arcanist-20170106.ebuild | 151 --------------------- www-client/arcanist/arcanist-20170224.ebuild | 151 +++++++++++++++++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 45 ------ .../20170106-MINOR-Disable-self-upgrade.patch | 149 -------------------- ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 45 ++++++ .../20170224-MINOR-Disable-self-upgrade.patch | 149 ++++++++++++++++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 2 +- .../files/9999-MINOR-Disable-self-upgrade.patch | 2 +- 8 files changed, 347 insertions(+), 347 deletions(-) delete mode 100644 www-client/arcanist/arcanist-20170106.ebuild create mode 100644 www-client/arcanist/arcanist-20170224.ebuild delete mode 100644 www-client/arcanist/files/20170106-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch delete mode 100644 www-client/arcanist/files/20170106-MINOR-Disable-self-upgrade.patch create mode 100644 www-client/arcanist/files/20170224-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch create mode 100644 www-client/arcanist/files/20170224-MINOR-Disable-self-upgrade.patch (limited to 'www-client/arcanist') diff --git a/www-client/arcanist/arcanist-20170106.ebuild b/www-client/arcanist/arcanist-20170106.ebuild deleted file mode 100644 index 4edb69d5..00000000 --- a/www-client/arcanist/arcanist-20170106.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="ncurses" - -inherit bash-completion-r1 python-single-r1 git-r3 - -DESCRIPTION="Command-line tool for Phabricator" -HOMEPAGE="https://www.phacility.com" -EGIT_REPO_URI="git://github.com/phacility/arcanist.git" -EGIT_BRANCH="stable" -EGIT_COMMIT="9503b941cc02be637d967bb50cfb25f852e071e4" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="git lint mercurial subversion ssl test" -REQUIRED_USE="test? ( lint )" - -DEPEND="virtual/awk:0 - test? ( - dev-lang/php[xmlwriter] - =dev-php/libphutil-20170113:0[test] - )" -RDEPEND="|| ( - dev-lang/php:5.6[cli,curl,json,ssl?] - dev-lang/php:7.1[cli,curl,json,ssl?] - ) - !!dev-lang/php:7.0 - =dev-php/libphutil-20170113:0[ssl?] - git? ( dev-vcs/git:0 ) - mercurial? ( dev-vcs/mercurial:0 ) - subversion? ( dev-vcs/subversion:0 ) - lint? ( - app-admin/puppet-lint:0 - dev-haskell/hlint:0 - dev-php/PHP_CodeSniffer:0 - dev-python/pylint:0[${PYTHON_USEDEP}] - dev-python/flake8:0[${PYTHON_USEDEP}] - dev-util/cppcheck:0 - dev-util/cpplint:0 - net-libs/nodejs:0[npm] - )" - -src_test() { - einfo "Note that you need to install some Node JS script manually:" - einfo " npm install -g coffeelint" - einfo " npm install -g csslint" - einfo " npm install -g jscs" - einfo " npm install -g jshint" - einfo " npm install -g jsonlint" - einfo " npm install -g less" - - local GIT_NAME="${FUNCNAME} for ${CATEGORY}/${PF}" - local GIT_EMAIL="portage@localhost" - - export GIT_AUTHOR_NAME="${GIT_NAME}" - export GIT_AUTHOR_EMAIL="${GIT_EMAIL}" - - export GIT_COMMITTER_NAME="${GIT_NAME}" - export GIT_COMMITTER_EMAIL="${GIT_EMAIL}" - - # Unable to locate binary "golint" to run linter ArcanistGoLintLinter. You may need to install the binary, or adjust your linter configuration. - # TO INSTALL: Install Golint using `go get github.com/golang/lint/golint`. - - # Set config in .git/arc/config for ArcanistPyLintLinter - bin/arc set-config --local lint.pylint.codes.advice '^(C|R).*' > /dev/null - bin/arc set-config --local lint.pylint.codes.error '^(E|F).*' > /dev/null - bin/arc set-config --local lint.pylint.codes.warning '^W.*' > /dev/null - - # + https://secure.phabricator.com/T7170 - - bin/arc unit --everything --no-coverage || die "arc unit failed" -} - -src_prepare() { - default - - git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" - git remote add origin "${EGIT_REPO_URI}" - git remote -v > "${S}/GIT_REMOTE_INFO" - - epatch "${FILESDIR}/${PV}-MINOR-Disable-self-upgrade.patch" - epatch "${FILESDIR}/${PV}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" - - find "${S}" -type f -name .gitignore -print0 \ - | xargs -0 --no-run-if-empty -- \ - rm - - rm bin/*.bat - - # Replace 'env' shebang to files it point to - find "${S}" -type f \ - | sort \ - | xargs -n 1 --no-run-if-empty -- \ - awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \ - | while read ; do - set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY}) - cmd="$1" ; shift ; args="$@" - - case "${cmd}" in - bash|php) ;; - *) continue ;; - esac - - path="$(type -p ${cmd})" || continue - [[ -z "${path}" ]] && continue - - einfo "Replace ${REPLY/#${S}\/} shebang to #!${path} ${args}" - sed -i \ - -e "1 s:^#!.*:#!${path} ${args}:" \ - "${REPLY}" - eend $? - done -} - -src_install() { - newbashcomp resources/shell/bash-completion "arc" - - insinto "/usr/share/${PN}" - doins GIT_COMMIT_INFO GIT_REMOTE_INFO - - insinto "/usr/share/php/${PN}" - doins -r bin externals resources scripts src - - python_scriptinto "/usr/share/php/${PN}/scripts" - python_doscript scripts/breakout.py - - # Make executable all shebanged files - find "${ED}" -type f \ - | xargs -n 1 --no-run-if-empty -- \ - awk 'NR == 1 && /^#!/ {print FILENAME}' \ - | sed -e "s:${ED}:/:" \ - | xargs --no-run-if-empty -- \ - fperms 755 - - dosym "/usr/share/php/${PN}/bin/arc" /usr/bin/arc - - dodoc NOTICE README.md -} - -pkg_postinst() { - if use lint; then - elog - elog "Some linter need external NodeJS script. To install them, use:" - elog " npm install -g csslint" - fi -} diff --git a/www-client/arcanist/arcanist-20170224.ebuild b/www-client/arcanist/arcanist-20170224.ebuild new file mode 100644 index 00000000..4f4c61f4 --- /dev/null +++ b/www-client/arcanist/arcanist-20170224.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="ncurses" + +inherit bash-completion-r1 python-single-r1 git-r3 + +DESCRIPTION="Command-line tool for Phabricator" +HOMEPAGE="https://www.phacility.com" +EGIT_REPO_URI="git://github.com/phacility/arcanist.git" +EGIT_BRANCH="stable" +EGIT_COMMIT="822bc53ca306e06314560d8a76f68771d732e8e0" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="git lint mercurial subversion ssl test" +REQUIRED_USE="test? ( lint )" + +DEPEND="virtual/awk:0 + test? ( + dev-lang/php[xmlwriter] + =dev-php/libphutil-20170318:0[test] + )" +RDEPEND="|| ( + dev-lang/php:5.6[cli,curl,json,ssl?] + dev-lang/php:7.1[cli,curl,json,ssl?] + ) + !!dev-lang/php:7.0 + =dev-php/libphutil-20170318:0[ssl?] + git? ( dev-vcs/git:0 ) + mercurial? ( dev-vcs/mercurial:0 ) + subversion? ( dev-vcs/subversion:0 ) + lint? ( + app-admin/puppet-lint:0 + dev-haskell/hlint:0 + dev-php/PHP_CodeSniffer:0 + dev-python/pylint:0[${PYTHON_USEDEP}] + dev-python/flake8:0[${PYTHON_USEDEP}] + dev-util/cppcheck:0 + dev-util/cpplint:0 + net-libs/nodejs:0[npm] + )" + +src_test() { + einfo "Note that you need to install some Node JS script manually:" + einfo " npm install -g coffeelint" + einfo " npm install -g csslint" + einfo " npm install -g jscs" + einfo " npm install -g jshint" + einfo " npm install -g jsonlint" + einfo " npm install -g less" + + local GIT_NAME="${FUNCNAME} for ${CATEGORY}/${PF}" + local GIT_EMAIL="portage@localhost" + + export GIT_AUTHOR_NAME="${GIT_NAME}" + export GIT_AUTHOR_EMAIL="${GIT_EMAIL}" + + export GIT_COMMITTER_NAME="${GIT_NAME}" + export GIT_COMMITTER_EMAIL="${GIT_EMAIL}" + + # Unable to locate binary "golint" to run linter ArcanistGoLintLinter. You may need to install the binary, or adjust your linter configuration. + # TO INSTALL: Install Golint using `go get github.com/golang/lint/golint`. + + # Set config in .git/arc/config for ArcanistPyLintLinter + bin/arc set-config --local lint.pylint.codes.advice '^(C|R).*' > /dev/null + bin/arc set-config --local lint.pylint.codes.error '^(E|F).*' > /dev/null + bin/arc set-config --local lint.pylint.codes.warning '^W.*' > /dev/null + + # + https://secure.phabricator.com/T7170 + + bin/arc unit --everything --no-coverage || die "arc unit failed" +} + +src_prepare() { + default + + git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" + git remote add origin "${EGIT_REPO_URI}" + git remote -v > "${S}/GIT_REMOTE_INFO" + + epatch "${FILESDIR}/${PV}-MINOR-Disable-self-upgrade.patch" + epatch "${FILESDIR}/${PV}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" + + find "${S}" -type f -name .gitignore -print0 \ + | xargs -0 --no-run-if-empty -- \ + rm + + rm bin/*.bat + + # Replace 'env' shebang to files it point to + find "${S}" -type f \ + | sort \ + | xargs -n 1 --no-run-if-empty -- \ + awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \ + | while read ; do + set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY}) + cmd="$1" ; shift ; args="$@" + + case "${cmd}" in + bash|php) ;; + *) continue ;; + esac + + path="$(type -p ${cmd})" || continue + [[ -z "${path}" ]] && continue + + einfo "Replace ${REPLY/#${S}\/} shebang to #!${path} ${args}" + sed -i \ + -e "1 s:^#!.*:#!${path} ${args}:" \ + "${REPLY}" + eend $? + done +} + +src_install() { + newbashcomp resources/shell/bash-completion "arc" + + insinto "/usr/share/${PN}" + doins GIT_COMMIT_INFO GIT_REMOTE_INFO + + insinto "/usr/share/php/${PN}" + doins -r bin externals resources scripts src + + python_scriptinto "/usr/share/php/${PN}/scripts" + python_doscript scripts/breakout.py + + # Make executable all shebanged files + find "${ED}" -type f \ + | xargs -n 1 --no-run-if-empty -- \ + awk 'NR == 1 && /^#!/ {print FILENAME}' \ + | sed -e "s:${ED}:/:" \ + | xargs --no-run-if-empty -- \ + fperms 755 + + dosym "/usr/share/php/${PN}/bin/arc" /usr/bin/arc + + dodoc NOTICE README.md +} + +pkg_postinst() { + if use lint; then + elog + elog "Some linter need external NodeJS script. To install them, use:" + elog " npm install -g csslint" + fi +} diff --git a/www-client/arcanist/files/20170106-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/20170106-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch deleted file mode 100644 index f3e2cd48..00000000 --- a/www-client/arcanist/files/20170106-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 07999ad135ca76559c029bd8841f79e841c5165d Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Sun, 18 Dec 2016 01:59:52 +0000 -Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in - /usr/share//GIT_COMMIT_INFO rather than from git - ---- - src/workflow/ArcanistVersionWorkflow.php | 19 +++++++------------ - 1 file changed, 7 insertions(+), 12 deletions(-) - -diff --git a/src/workflow/ArcanistVersionWorkflow.php b/src/workflow/ArcanistVersionWorkflow.php -index 807c573275bf..fefd972786dc 100644 ---- a/src/workflow/ArcanistVersionWorkflow.php -+++ b/src/workflow/ArcanistVersionWorkflow.php -@@ -35,23 +35,18 @@ EOTEXT - } - - $roots = array( -- 'arcanist' => dirname(phutil_get_library_root('arcanist')), -- 'libphutil' => dirname(phutil_get_library_root('phutil')), -+ 'arcanist', -+ 'libphutil' - ); - -- foreach ($roots as $lib => $root) { -- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); -- $configuration_manager = clone $this->getConfigurationManager(); -- $configuration_manager->setWorkingCopyIdentity($working_copy); -- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( -- $configuration_manager); -- -- if (!Filesystem::pathExists($repository->getMetadataPath())) { -+ foreach ($roots as $lib) { -+ $commit_info = "/usr/share/" . $lib . "/GIT_COMMIT_INFO"; -+ if (!Filesystem::pathExists($commit_info)) { - throw new ArcanistUsageException( -- pht('%s is not a git working copy.', $lib)); -+ pht('%s has no version registered in %s.', $lib, $commit_info)); - } - -- list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct'); -+ $stdout = file_get_contents($commit_info); - list($commit, $timestamp) = explode(' ', $stdout); - - $console->writeOut( diff --git a/www-client/arcanist/files/20170106-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/20170106-MINOR-Disable-self-upgrade.patch deleted file mode 100644 index 73ff8da8..00000000 --- a/www-client/arcanist/files/20170106-MINOR-Disable-self-upgrade.patch +++ /dev/null @@ -1,149 +0,0 @@ -From f89fda97ac76b5de53fb19dae1c013ae0e9961e1 Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Sun, 18 Dec 2016 02:15:13 +0000 -Subject: [PATCH 2/2] MINOR: Disable self upgrade - ---- - src/__phutil_library_map__.php | 2 - - src/workflow/ArcanistUpgradeWorkflow.php | 112 ------------------------------- - 2 files changed, 114 deletions(-) - delete mode 100644 src/workflow/ArcanistUpgradeWorkflow.php - -diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php -index d8f10dd401a7..af9c8ef7e056 100644 ---- a/src/__phutil_library_map__.php -+++ b/src/__phutil_library_map__.php -@@ -381,7 +381,6 @@ phutil_register_library_map(array( - 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php', - 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnsafeDynamicStringXHPASTLinterRule.php', - 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php', -- 'ArcanistUpgradeWorkflow' => 'workflow/ArcanistUpgradeWorkflow.php', - 'ArcanistUploadWorkflow' => 'workflow/ArcanistUploadWorkflow.php', - 'ArcanistUsageException' => 'exception/ArcanistUsageException.php', - 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUseStatementNamespacePrefixXHPASTLinterRule.php', -@@ -795,7 +794,6 @@ phutil_register_library_map(array( - 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', - 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', - 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', -- 'ArcanistUpgradeWorkflow' => 'ArcanistWorkflow', - 'ArcanistUploadWorkflow' => 'ArcanistWorkflow', - 'ArcanistUsageException' => 'Exception', - 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', -diff --git a/src/workflow/ArcanistUpgradeWorkflow.php b/src/workflow/ArcanistUpgradeWorkflow.php -deleted file mode 100644 -index 50449ef75f27..000000000000 ---- a/src/workflow/ArcanistUpgradeWorkflow.php -+++ /dev/null -@@ -1,112 +0,0 @@ -- dirname(phutil_get_library_root('phutil')), -- 'arcanist' => dirname(phutil_get_library_root('arcanist')), -- ); -- -- foreach ($roots as $lib => $root) { -- echo phutil_console_format( -- "%s\n", -- pht('Upgrading %s...', $lib)); -- -- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); -- $configuration_manager = clone $this->getConfigurationManager(); -- $configuration_manager->setWorkingCopyIdentity($working_copy); -- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( -- $configuration_manager); -- -- if (!Filesystem::pathExists($repository->getMetadataPath())) { -- throw new ArcanistUsageException( -- pht( -- "%s must be in its git working copy to be automatically upgraded. ". -- "This copy of %s (in '%s') is not in a git working copy.", -- $lib, -- $lib, -- $root)); -- } -- -- $this->setRepositoryAPI($repository); -- -- // NOTE: Don't use requireCleanWorkingCopy() here because it tries to -- // amend changes and generally move the workflow forward. We just want to -- // abort if there are local changes and make the user sort things out. -- $uncommitted = $repository->getUncommittedStatus(); -- if ($uncommitted) { -- $message = pht( -- 'You have uncommitted changes in the working copy for this '. -- 'library:'); -- -- $list = id(new PhutilConsoleList()) -- ->setWrap(false) -- ->addItems(array_keys($uncommitted)); -- -- id(new PhutilConsoleBlock()) -- ->addParagraph($message) -- ->addList($list) -- ->draw(); -- -- throw new ArcanistUsageException( -- pht('`arc upgrade` can only upgrade clean working copies.')); -- } -- -- $branch_name = $repository->getBranchName(); -- if ($branch_name != 'master' && $branch_name != 'stable') { -- throw new ArcanistUsageException( -- pht( -- "%s must be on either branch '%s' or '%s' to be automatically ". -- "upgraded. ". -- "This copy of %s (in '%s') is on branch '%s'.", -- $lib, -- 'master', -- 'stable', -- $lib, -- $root, -- $branch_name)); -- } -- -- chdir($root); -- -- try { -- execx('git pull --rebase'); -- } catch (Exception $ex) { -- // If we failed, try to go back to the old state, then throw the -- // original exception. -- exec_manual('git rebase --abort'); -- throw $ex; -- } -- } -- -- echo phutil_console_format( -- "**%s** %s\n", -- pht('Updated!'), -- pht('Your copy of arc is now up to date.')); -- return 0; -- } -- --} diff --git a/www-client/arcanist/files/20170224-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/20170224-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch new file mode 100644 index 00000000..6f3685df --- /dev/null +++ b/www-client/arcanist/files/20170224-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -0,0 +1,45 @@ +From 1848d3bf3837ad39a7a141731bbb0389c03eed2e Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sun, 18 Dec 2016 01:59:52 +0000 +Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in + /usr/share//GIT_COMMIT_INFO rather than from git + +--- + src/workflow/ArcanistVersionWorkflow.php | 19 +++++++------------ + 1 file changed, 7 insertions(+), 12 deletions(-) + +diff --git a/src/workflow/ArcanistVersionWorkflow.php b/src/workflow/ArcanistVersionWorkflow.php +index 807c573275bf..fefd972786dc 100644 +--- a/src/workflow/ArcanistVersionWorkflow.php ++++ b/src/workflow/ArcanistVersionWorkflow.php +@@ -35,23 +35,18 @@ EOTEXT + } + + $roots = array( +- 'arcanist' => dirname(phutil_get_library_root('arcanist')), +- 'libphutil' => dirname(phutil_get_library_root('phutil')), ++ 'arcanist', ++ 'libphutil' + ); + +- foreach ($roots as $lib => $root) { +- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); +- $configuration_manager = clone $this->getConfigurationManager(); +- $configuration_manager->setWorkingCopyIdentity($working_copy); +- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( +- $configuration_manager); +- +- if (!Filesystem::pathExists($repository->getMetadataPath())) { ++ foreach ($roots as $lib) { ++ $commit_info = "/usr/share/" . $lib . "/GIT_COMMIT_INFO"; ++ if (!Filesystem::pathExists($commit_info)) { + throw new ArcanistUsageException( +- pht('%s is not a git working copy.', $lib)); ++ pht('%s has no version registered in %s.', $lib, $commit_info)); + } + +- list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct'); ++ $stdout = file_get_contents($commit_info); + list($commit, $timestamp) = explode(' ', $stdout); + + $console->writeOut( diff --git a/www-client/arcanist/files/20170224-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/20170224-MINOR-Disable-self-upgrade.patch new file mode 100644 index 00000000..b57f4399 --- /dev/null +++ b/www-client/arcanist/files/20170224-MINOR-Disable-self-upgrade.patch @@ -0,0 +1,149 @@ +From b6e3a67d6526140be03ac28549b843a2312e598c Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sun, 18 Dec 2016 02:15:13 +0000 +Subject: [PATCH 2/2] MINOR: Disable self upgrade + +--- + src/__phutil_library_map__.php | 2 - + src/workflow/ArcanistUpgradeWorkflow.php | 112 ------------------------------- + 2 files changed, 114 deletions(-) + delete mode 100644 src/workflow/ArcanistUpgradeWorkflow.php + +diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php +index d8f10dd401a7..af9c8ef7e056 100644 +--- a/src/__phutil_library_map__.php ++++ b/src/__phutil_library_map__.php +@@ -381,7 +381,6 @@ phutil_register_library_map(array( + 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php', + 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnsafeDynamicStringXHPASTLinterRule.php', + 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php', +- 'ArcanistUpgradeWorkflow' => 'workflow/ArcanistUpgradeWorkflow.php', + 'ArcanistUploadWorkflow' => 'workflow/ArcanistUploadWorkflow.php', + 'ArcanistUsageException' => 'exception/ArcanistUsageException.php', + 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUseStatementNamespacePrefixXHPASTLinterRule.php', +@@ -795,7 +794,6 @@ phutil_register_library_map(array( + 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', + 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', + 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', +- 'ArcanistUpgradeWorkflow' => 'ArcanistWorkflow', + 'ArcanistUploadWorkflow' => 'ArcanistWorkflow', + 'ArcanistUsageException' => 'Exception', + 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', +diff --git a/src/workflow/ArcanistUpgradeWorkflow.php b/src/workflow/ArcanistUpgradeWorkflow.php +deleted file mode 100644 +index 50449ef75f27..000000000000 +--- a/src/workflow/ArcanistUpgradeWorkflow.php ++++ /dev/null +@@ -1,112 +0,0 @@ +- dirname(phutil_get_library_root('phutil')), +- 'arcanist' => dirname(phutil_get_library_root('arcanist')), +- ); +- +- foreach ($roots as $lib => $root) { +- echo phutil_console_format( +- "%s\n", +- pht('Upgrading %s...', $lib)); +- +- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); +- $configuration_manager = clone $this->getConfigurationManager(); +- $configuration_manager->setWorkingCopyIdentity($working_copy); +- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( +- $configuration_manager); +- +- if (!Filesystem::pathExists($repository->getMetadataPath())) { +- throw new ArcanistUsageException( +- pht( +- "%s must be in its git working copy to be automatically upgraded. ". +- "This copy of %s (in '%s') is not in a git working copy.", +- $lib, +- $lib, +- $root)); +- } +- +- $this->setRepositoryAPI($repository); +- +- // NOTE: Don't use requireCleanWorkingCopy() here because it tries to +- // amend changes and generally move the workflow forward. We just want to +- // abort if there are local changes and make the user sort things out. +- $uncommitted = $repository->getUncommittedStatus(); +- if ($uncommitted) { +- $message = pht( +- 'You have uncommitted changes in the working copy for this '. +- 'library:'); +- +- $list = id(new PhutilConsoleList()) +- ->setWrap(false) +- ->addItems(array_keys($uncommitted)); +- +- id(new PhutilConsoleBlock()) +- ->addParagraph($message) +- ->addList($list) +- ->draw(); +- +- throw new ArcanistUsageException( +- pht('`arc upgrade` can only upgrade clean working copies.')); +- } +- +- $branch_name = $repository->getBranchName(); +- if ($branch_name != 'master' && $branch_name != 'stable') { +- throw new ArcanistUsageException( +- pht( +- "%s must be on either branch '%s' or '%s' to be automatically ". +- "upgraded. ". +- "This copy of %s (in '%s') is on branch '%s'.", +- $lib, +- 'master', +- 'stable', +- $lib, +- $root, +- $branch_name)); +- } +- +- chdir($root); +- +- try { +- execx('git pull --rebase'); +- } catch (Exception $ex) { +- // If we failed, try to go back to the old state, then throw the +- // original exception. +- exec_manual('git rebase --abort'); +- throw $ex; +- } +- } +- +- echo phutil_console_format( +- "**%s** %s\n", +- pht('Updated!'), +- pht('Your copy of arc is now up to date.')); +- return 0; +- } +- +-} diff --git a/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch index 4e11a245..daca88fa 100644 --- a/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ b/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -1,4 +1,4 @@ -From 141f822a878f7dc42d670717f184c0508e8f0849 Mon Sep 17 00:00:00 2001 +From 3b68cf04b253e42fc9e92e5acae57d49e9a7ae47 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 18 Dec 2016 01:59:52 +0000 Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in diff --git a/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch index 9836aaa6..acb20cde 100644 --- a/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch +++ b/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch @@ -1,4 +1,4 @@ -From 1c03fe968551fce359338cf1d874f3c3344654de Mon Sep 17 00:00:00 2001 +From 7e12c9e72fd8dc8bae8e54e844e5f8c96024ea96 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 18 Dec 2016 02:15:13 +0000 Subject: [PATCH 2/2] MINOR: Disable self upgrade -- cgit v1.2.3