-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contributors: how best to handle your local & upstream branches? #6025
Comments
Different developers have done this differently. I use the setup described in HACKING.md:
Drawbacks:
As for VMs, I definitely test See also: forcing fully-qualified command without twiddling symlinks. |
Updates to It somewhat irks me that the documented |
@rolandwalker Thanks, great info! Stupid question: how do you best run OS X in a VM? Last I heard, Apple made it very hard to do so. |
I typically use Finally, when everything's working, I update my development repository (located on another volume) to the latest upstream (and push to send these to my GitHub fork), and make a new branch for the commit. git pull upstream master && git push && git branch <CaskName> && git checkout <CaskName> Finally, all that's left is to move over the Cask file from my production system into the development repo (I say move and not copy so that I don't accidentally leave it there and fail an update when my PR gets merged). With a push off to my fork branch, it's then up in GitHub. mv /usr/local/Library/Taps/caskroom/homebrew-cask/Casks/<CaskName>.rb Casks/<CaskName>.rb
git push origin <CaskName> # you must specify branch to push to (usually) because default remote has not been set From there, I just go to GitHub and submit the PR.
Indeed, they did. I would suggest multibooting instead (the second OS can be periodically wiped/re-imaged/etc). |
@treyharris as far as I know, VMs are easy for Mavericks and later, if hosted in OS X, on Mac hardware. For the latest VMware it is a dead simple "create a VM" which launches a wizard. For VirtualBox, someone else would have to answer. If you are not on a Mac/OS X stack, I think Apple actively tries to stop you. |
Using VMWare, it is indeed dead simple, as is (from what I’ve read online) the case with Parallels. They’re both commercial applications, and while searching around (less than one year ago), Parallels certainly came of as being superior (or having more vocal fans, I suppose) while at the same time being criticised for every year launching paid upgrades with very few and negligible new features, but that is compatible with the new OS version. VMWare isn’t different, though (although I haven’t read criticism on this point, despite them doing the same); I don’t know why they don’t just use a subscription model, but I’d sure like to. It is cheaper than Parallels, fits my needs well, and I’ve used them before many years ago, so that’s what I use now, although I’m not sure I’ll stick with it. Apple allows you to legally run OS X on VMs (it’s on the OS’s license) as long as it’s on Mac hardware, as @rolandwalker mentioned. If you comply with that, they likely don’t give a crap how you do it, and these commercial companies sure can get it working by the time the OS is released. If you want to be a bit cynical, it sure seems like they purposefully build the software in a way it will stop working on new versions1, just to force you to pay again. This are suppositions, naturally, but be aware that if you continue to upgrade your OS, you’ll also need to pay for the software over and over, on a predictable time schedule, with disappointing new features2. Regarding VirtualBox, you’ll likely need to try and see. Don’t get your hopes up, though. I’ve used it many years and it seems to be inferior in possibly every way, from interface to usability and actual capabilities. It also has (had?) some issues running on newer Macs, that have been going on for quite some time. I could install Mavericks on Mavericks in a 2004 MacBook Pro, but could not do it on a Retina MacBook Pro from 2013. It is a known issue, and you’ll find references to it online (that’s how I knew it wouldn’t work). It is free, though3. 1 Or at the very least if it only needs a small tweak, they’ll ignore that and launch a new version anyway. 2 “Bitter”? What do you mean? 3 Or, let’s say you don’t pay with money, but possibly with headaches. |
I personally run a Hackintosh, and I've used Niresh to install Mavericks on VirtualBox (guide linked), although that's not the method I use for my Hack itself. I did use this method to test Kitchenplan, Chef-based provisioning script. That said, I don't hack around with Cask core myself, so I would imagine it would be tedious to work with VirtualBox's terrible window manager for an extended period of time. |
Just a general question here. How do you recommend branching, forking, and setting upstreams so that you can:
homebrew-cask
code (casks and in the commands core) and test it livebrew update
without being prompted for merge commits every time?(First, let me assure you I do use feature branches, so I'm not being completely stupid here. But at some points, I sometimes want to actually apply those features to my system even if they aren't merged into this origin (yet).)
At first, I used the
hub
CLI defaults for cloning and creating tracking branches in one fell swoop, which gave me amaster
tracking my fork at remotetreyharris
, and anorigin
remote (pointing atcaskroom/homebrew-cask/master
, of course) with no tracking branches. That let me merge local stuff into my master and fetch and merge manually from theorigin/master
. But then the first time I ranbrew update
, and every time thereafter, I got prompted for a merge commit when it got to thecaskroom
tap. Ugh.So I backed up and I tried
brew update --rebase
, and that looked good the first time, but it ended up worse, since after the second time it gave me rewritten commits with hashes on my local commits that didn't match already-pushed commits attreyharris/master
, so I had to reset my branch on GitHub (good thing nobody was forking it!) and start over.Should I have
master
pristinely trackorigin/master
, use some other branch to tracktreyharris
which I will ordinarily keep checked out (and hence the one in use by the running system), and try to remember to checkoutmaster
each time before I runbrew update
? (I could alias(cd /usr/local/Library/Taps/caskroom/homebrew-cask && git checkout master && brew update && git checkout -)
fairly easily if that's the best solution.)Or is there a cleverer way? I was looking at the various
branch\..*
andremote\..*
config options thinking, "there's gotta be a neat way to handle this", but I bet y'all have this down pat. Any suggestions?I gotta say, homebrew's separating out the formulae into a separate repo is a big help for my not having the same issue there, so looking forward to Casks getting separated as well.
p.s. While I'm asking: how do you play around with changes you make to the code? In non-desktop Unix admin, which is where my professional background lies, you'd use a dev sandbox machine or run a virtual for that kind of thing. How about you guys? Do you run a separate throwaway Mac for that purpose, do you have some OS X virtualization method, or do you just trust the tests and not worry about running live experimental commands on a live machine?
The text was updated successfully, but these errors were encountered: