How to change the update URL for a wordpres theme/how to set up updates for a theme I have created m


I basically want to know- the best /easiest way to find out where the update URL for any wordpress theme is stored- and how to change this.

In this case, i want to make some changes to an open source theme and hence also want to change its update URL. What I cant figure out is how and where to change that theme's update URL.

Another question-- how does the update mechanism work? Eg. Can I just store zip files of a theme, with the file name including version number at the end- and in my theme update PHP file simply check and compare the version number of a zip file (to see if this is a later version when compared with the version number of installed theme of same name)? Or is there some other easier way to do version comparison and updates?