83 Commits

Author SHA1 Message Date
Xu Cheng
a9b9c5ade7 Tap: allow enumerate non-git taps
Also add a `Tap#git?` method to indicate whether the tap is a git
repository.

Closes Homebrew/homebrew#42264.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-30 21:28:52 +08:00
Mike McQuaid
151890148c update: fix --rebase 2015-07-09 23:50:55 +01:00
Mike McQuaid
b11ae2abdc update: stash save/pop uncommitted changes.
Also:
- return to your previous branch after `brew update`.

Closes Homebrew/homebrew#38568.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-09 12:33:31 +01:00
Xu Cheng
44383fecb8 (un)tap/update/readall: use Tap class 2015-06-11 15:28:29 +08:00
Xu Cheng
023230cb6a update: only display version changed formulae
Closes Homebrew/homebrew#40090.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-02 17:24:05 +08:00
Jack Nagel
efd52da101 Remove dead code 2015-05-27 21:57:41 -04:00
Xu Cheng
171c3dd2d9 tap/untap/update/prune: remove obsolete method, add migrate_taps 2015-05-27 13:53:40 +08:00
Jack Nagel
fef8b0871d Remove obsolete nil guard
This was added in 3a7a3619f7016c75c3e53e944221bf7f6354a63b to make the
tests pass, but this method is now stubbed out in the tests, so we can
assume $? will be non-nil.
2014-09-18 21:56:48 -05:00
Jack Nagel
56dd575f96 Pass command and arg list into ErrorDuringExecution constructor 2014-09-18 20:32:50 -05:00
Jack Nagel
f40650ecd0 Set the remote config manually
See 5cd6b35 and 8eefd4e.
2014-08-12 01:46:12 -05:00
Jack Nagel
b160cc9bb6 Handle tap file renames that remove a file from the formula directory 2014-07-31 15:58:03 -05:00
Jack Nagel
87850d00cd Remove obsolete hacks from updater report 2014-07-26 20:11:53 -05:00
Jack Nagel
2b90995c3e Only populate the report with formula paths 2014-07-26 20:11:53 -05:00
Jack Nagel
197a12c900 Switch from backticks to Utils.popen_read 2014-07-26 20:11:53 -05:00
Jack Nagel
802775078c Separate reading and parsing the diff 2014-07-26 20:11:53 -05:00
Jack Nagel
6baf357f8c update: remove unused rename detection
Right now this code only produces false positives. When we have real
support for renames, we can implement it more carefully.

Closes Homebrew/homebrew#31126.
2014-07-25 12:28:05 -05:00
Jack Nagel
2cf116464d update: simplify diff parsing 2014-07-25 12:25:58 -05:00
Jack Nagel
44254aa9cf Remove redundant "which git" guards
There is always a git executable on PATH due to the git wrapper in
Library/Contributions/cmd. The wrapper will notify the user if there is
not a real git installed.
2014-07-06 14:10:52 -05:00
Jack Nagel
2d83c08592 Make tap_ref match similar code in update 2014-07-06 13:12:01 -05:00
Jack Nagel
f8fb74ff76 Escape paths in regexps 2014-07-06 11:25:56 -05:00
Jack Nagel
7cd31377a4 Convert update report to use composition 2014-06-27 21:58:15 -05:00
Jack Nagel
346fa5098f Simplify valid_formula_location? method 2014-06-27 21:58:15 -05:00
Jack Nagel
3dbcba0c03 Call original backtick using super 2014-06-23 18:50:55 -05:00
Jack Nagel
8d12684efe Pass repository path into the updater 2014-06-23 18:41:50 -05:00
Jack Nagel
f0e13ee97b Use multiple argument form of system 2014-06-20 18:37:24 -05:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Jack Nagel
bf365fc23b Prefer Dir.glob when iterating over the result 2014-05-31 23:53:36 -05:00
Tsukasa OMOTO
d1f15e967b Taps: cleanup regexps around Taps
Closes Homebrew/homebrew#29139.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-14 11:12:51 -05:00
Jack Nagel
d8c15c8fbf The \w character class already includes underscore
Newer versions of Ruby issue a warning for repeated character classes.
2014-05-03 15:03:22 -05:00
Jack Nagel
b40a3413e3 Pass around only absolute paths when dealing with taps 2014-04-25 18:36:31 -05:00
Jack Nagel
a0494441d3 Build relative paths using resolved_path and relative_path_from 2014-04-25 12:34:37 -05:00
Jack Nagel
9b60c1470a Less code in begin clause 2014-04-25 12:34:28 -05:00
Jack Nagel
b0cd6b0376 Extract some boilerplate into an each_tap method 2014-04-25 11:25:38 -05:00
Tsukasa OMOTO
54004a4759 Make the on-disk representation of taps unambiguous
This commit supports "-" and "_" in names of user and repository.

Closes Homebrew/homebrew#28203.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-24 17:10:41 -05:00
Mike McQuaid
4dd6f0cb4c install, update: AlreadyTappedError never raised. 2014-01-03 21:57:06 +00:00
Mike McQuaid
228a5a545a update: rewrite origin to point to Homebrew org. 2013-12-14 23:10:20 +00:00
Jack Nagel
6c04ccfb3b Remove unused variables 2013-12-12 15:42:35 -06:00
Jack Nagel
6071e3b54c Fix tap migrations
When a `brew update` pulls down additions to tap_migrations.rb and the
removed formulae in the same update, the migrations will never run,
because tap_migrations.rb is loaded before the update takes place. Fix
this by loading it after the update.
2013-12-02 16:22:40 -06:00
Jack Nagel
f42c7f1cc3 update: add remaining status indicators to diff-tree regexp
As I understand it, we should never encounter these, but...
2013-11-14 09:52:33 -06:00
Jack Nagel
8335401bc3 update: guard against nil in tap migrations 2013-11-14 09:25:27 -06:00
Jack Nagel
f41e1a3b83 Add file type change to git diff-tree regexp
Fixes Homebrew/homebrew#24286.
2013-11-14 09:24:28 -06:00
Mike McQuaid
e24bcba00a update: check if Cellar exists instead of factory.
Fixes Homebrew/homebrew#23881.
2013-11-01 23:23:14 -07:00
Mike McQuaid
d31e069ed3 update: automatically tap migrated formulae.
When a formula is removed from core and installed let's tap it so users
can get updates without caring which tap we want to put things in.

This should allow us to migrate a lot of things to taps.

Closes Homebrew/homebrew#23760.
2013-10-30 11:24:21 -07:00
Mike McQuaid
8d0c8fd978 update: handle realpath exception. 2013-09-24 23:07:01 +01:00
Mike McQuaid
5e13933557 update: untap/retap formulae before/after pull.
This should fix problems like Homebrew/homebrew#19799 where we pull formulae from taps
into core. I want to get something similar merged ASAP so we can pull
GCC into core (see Homebrew/homebrew#20678).

Closes Homebrew/homebrew#19799.
2013-09-24 23:06:10 +01:00
Jack Nagel
4c55082e7c update: restore previous state when interrupted
Fixes Homebrew/homebrew#19460.
Closes Homebrew/homebrew#22375.
2013-09-10 15:12:39 -05:00
phinze
9a94a77fa3 Properly define tapped formulae in update
A tapped formula is a ruby file present:

  - in the root of the tap
  - in directory of the tap called Formula
  - in a directory of the tap called HomebrewFormula

And nowhere else. This corrects an overzealous definition of tapped
formula in the updater. (the correct definition has been in Pathname
since e613cbe5783cea2abb8100b56c22126a1ab6b9f2)

Refs Homebrew/homebrew#19743.
Closes Homebrew/homebrew#21087.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-07-09 20:52:51 -05:00
Adam Vandenberg
a60eed48bc Remove adamv-alt references.
Closes Homebrew/homebrew#20364.
2013-06-09 07:32:06 -07:00
Peter Aronoff
c9563cce95 Fix brew update so that it doesn't show doubles
Under certain conditions, `brew update` will show doubles. It's a rare
edge-case, but if you have a tap where the name of the formula is identical
with the name of the insalled file, then you see output like this:

    ==> Updated Formulae
    aalib				   ssh-copy-id
    casperjs				   sshuttle
    jack				   telemachus/anytap/brew-any-tap
    mogenerator				   telemachus/anytap/brew-any-tap

I believe this should fix that.

Closes Homebrew/homebrew#18495.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-03-16 16:27:46 -05:00
Jack Nagel
1a799f04e6 Remove unused variables 2013-02-18 12:13:35 -06:00