aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_pin.rb
AgeCommit message (Collapse)Author
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-09-15Use constants for LinkedKegs/PinnedKegs/Locks.Mike McQuaid
These definitions are scattered throughout the codebase which makes it hard to refactor them later (my goal is to move them outside of HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier movement later.
2016-08-05various: eliminate the usage of `any?` (#638)Xu Cheng
`any?` is not the opposite of `empty?`. Besides the case that `[false, nil].any?` will return false, `any?`(O(n)) has much worse performance than `empty?`(O(1)).
2015-11-29formula_pin: use installed_prefixes/installed_kegsXu Cheng
2015-11-16add Formula#pinned_versionXu Cheng
2015-11-16FormulaPin: pin at max versionXu Cheng
2014-06-23Remove pin directory when emptyJack Nagel
2014-06-21Simplify picking pinned versionJack Nagel
2014-06-21Remove FormulaPin dependency on FileUtilsJack Nagel
2013-04-16Add tests for FormulaPin and simplify implementationJack Nagel
2013-04-14Avoid slow operations in FormulaPin#initializeJack Nagel
A FormulaPin object is created every time Formula is instantiated, so don't do filesystem operations or Pathname concatenation eagerly.
2013-04-14Don't use Pathname#/ in performance-critical codeJack Nagel
This method (well, really, #join) is *twice* as slow as simple concatenation, and shouldn't really be used at all in non-Formula code.
2013-04-04Remove circular requireJack Nagel
2013-03-31brew-pin: Fix bug in `FormulaPin#pinned?`Simon Sigurdhsson
Since `pinned?` was using `File#exists?`, broken symlinks left by force-upgraded formulae made `pinned?` return false while `pin` returned with an error because it could not overwrite the broken link. This is fixed by using `File#symlink?` instead, which returns true for broken symlinks and false only when they do not exist. Closes Homebrew/homebrew#18858. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-30brew-pin: prevent selected formulae from upgrade.Simon Sigurdhsson
* Added `pin` et. al. to manpage. * Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1` * Added `brew list --pinned` to `brew.1` * Added information about frozen formulae to `brew upgrade` in `brew.1` * Added `pin` et.al. to completion scripts. * Unpin formulae when uninstalling them * Unpin and re-pin formulae when upgrading (avoids stale symlink) References Homebrew/homebrew#18386. Closes Homebrew/homebrew#18515. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>