Can't see option "Prevent OS from sleeping when streaming"

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Can't see option "Prevent OS from sleeping when streaming"

Post by Nadahar »

The whole git and github way of thinking can be a bit of a challenge to understand at first, so no worries.

The thing to understand is that git, unlike svn etc, consist of many git repositories that interact. When you "clone" a repository you actually make your own git repository that is a clone of the repository you clone (not that unlogical when I put it like that :P). The point is that any changes/commits you do to that is done in your local repository on the computer you do this on, and any changes/commits done to the remote repository is local to that repository, they aren't automatically kept in sync in any way. The terms push and pull is for uploading and downloading a (local) repository to/from a (remote) repository.

When you "pull" git will see if your local repository and the remote has changes, and will try to merge these if there are. Whether the merge succeeds or not depends on the changes themselves, git merge is able to figure out a whole lot, but if you have both changed the same code it will fail. You will then have to do a "manual merge" where you are presented with both versions of the code and will have to choose which parts to keep and which to discard. This can be a pain, so one generally tries to avoid that situation.

That's where branches come in. By organizing changes into "logical" branches one can minimize the merges (and merge conflicts) by working with different things separately. A branch is a repository concept though, so your local repository and the remote repository can (and usually do) have different branches. When you "check out" a remote branch, what you actually do is to create an identical branch in your local repository with an embedded "link" that tells git that this repository should "track" a given branch on a given remote repository. While they often have the same name, they don't have to, and you can estabilish or remove such "track" relationships at any time - the branch doesn't have to be checked out from the branch you're tracking in the first place. Tracking a branch is useful (but not necessary) because that will tell git what your default pull/push target is for a given branch, and it will automatically give you a status of the difference between them if any.

To make it even more complicated, when git compares you local branch to the remote, it doesn't. For each "remote" in a local repository, git keeps a cache. Comparisons is actually made against the cache of the remote repository, not the actual remote repository (because that would be very slow and bandwidth consuming). That means that what git tells you about the remote can be utter nonsense. To update your local cache of a remote, you use git "fetch". Fetch doesn't do anything to your local repository, it simply updates your cache of the given remote so that your information is up to date.

Now to your question: If you cloned UMS' GitHub repository, created a branch in your local repository and committed your changes, you would have no way to get those changes to the UMS' GitHub repository because you don't have write permission to this repository. Actually, that's not true because you could create a "patch" from your changes and email or upload the patch so that someone with write permission to UMS' git repository could import them. But, GitHub has come up with a way to make it easier to exchange changes even if it can sound more complicated at first.

By creating a fork on GitHub, you actually clone the source repository to your GitHub account - but GitHub, having created the fork, knows about the relation between the two. The difference is that you have write permissions to this clone. So, by using your "fork" as the remote, you are able to push your local changes to GitHub. From there, you can create a pull request from any of "your" branches against any of the "remote" branches. A pull request is simply a request to anyone with write permission on the remote repository to "pull" your branch onto theirs, doing a merge of the two. GitHub streamlines this process as much as possible, so it presents the differences between the two, allows us to write comments and leave reviews, run tests etc on the branch requesting to be "pulled".

You usually create a pull request against "master" at the remote branch. "Master" is the master/main branch by convention, but there's no rule that says it has to be. If the remote repository want to merge it into another branch instead, they can change this in the pull request.

Only those with write access to the UMS repository can create and push branches to this repository. Get it?
michaelt
Posts: 155
Joined: Tue Feb 03, 2015 11:18 am
Location: lost in the depths of my mind

Re: Can't see option "Prevent OS from sleeping when streaming"

Post by michaelt »

Last post was very good - should be pinned as a guide for all.

Got through the changes, testing, commit & push.
How do I tell if the NB push worked?

Now stuck on GitHub pull request.

Pictures better/faster than words.
Screen Shot 2017-01-05 at 7.46.37 PM.png
Screen Shot 2017-01-05 at 7.46.37 PM.png (19.88 KiB) Viewed 8828 times
Screen Shot 2017-01-05 at 7.47.08 PM.png
Screen Shot 2017-01-05 at 7.47.08 PM.png (12.19 KiB) Viewed 8828 times
Screen Shot 2017-01-05 at 7.47.41 PM.png
Screen Shot 2017-01-05 at 7.47.41 PM.png (55.27 KiB) Viewed 8828 times
Tried different base/head/fork/compare combos - nothing.
This is not intuitive.
What am I doing wrong?
MacPro5,1 - 2.8 GHz, 32 GB, 20TB, OS X 10.11.6,
. . . . and a few others.
Samsung UN55C8000
Home Theater (WIP): OS X based now, dedicated Linux later.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Can't see option "Prevent OS from sleeping when streaming"

Post by Nadahar »

The NB push didn't work/the changes are not pushed to https://github.com/michaelt-ums/UniversalMediaServer
michaelt
Posts: 155
Joined: Tue Feb 03, 2015 11:18 am
Location: lost in the depths of my mind

Re: Can't see option "Prevent OS from sleeping when streaming"

Post by michaelt »

OK - I'll look to see what NB is really doing & where.

thanx
MacPro5,1 - 2.8 GHz, 32 GB, 20TB, OS X 10.11.6,
. . . . and a few others.
Samsung UN55C8000
Home Theater (WIP): OS X based now, dedicated Linux later.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Can't see option "Prevent OS from sleeping when streaming"

Post by Nadahar »

As long as you haven't entered your github credentials anywhere in NB, I can guarantee you that no push has been performed. You don't have write permission to your GitHub fork without them.
michaelt
Posts: 155
Joined: Tue Feb 03, 2015 11:18 am
Location: lost in the depths of my mind

Re: Can't see option "Prevent OS from sleeping when streaming"

Post by michaelt »

Found the problem: "Push" sb "Push to Upstream"
PR posted & waiting.
The Research/Code/Test took <30 min, getting into the system: >10 hrs! Next time should be better.

thanks for all the help.
MacPro5,1 - 2.8 GHz, 32 GB, 20TB, OS X 10.11.6,
. . . . and a few others.
Samsung UN55C8000
Home Theater (WIP): OS X based now, dedicated Linux later.
Post Reply