Publishing

Hi, I’m wondering how the publishing tool determines file changes. Does it just look at dates and sizes and if so, is there some way to deal with servers in different timezones. Specifically, can I somehow tell the publishing algorithm the remote timezone offset?

Hey @mtvee,

You can see the code publishing in the Publishing extension source: KomodDir\lib\mozilla\extensions\publishing@ActiveState.com\components\ koPublishingSettings.py

Local files compare, inode number > mode > last modified time > size between a saved state for the local file and the files current state.

The remote compare does the same thing minus the inode number.

If you need to pass in a timezone offset, that usually means that your clocks are wrong on either or both of your systems. That shouldn’t be necessary.

  • Carey

Note that the timestamp between the local and the remote server does not matter, as Komodo only ever compares the timestamp to what it had before on that server (i.e. last remote file timestamp v’s the current remote file timestamp)… Komodo does not compare the timestamp of local file v’s remote file.

Thanks for the info guys. So, are you saying Komodo caches the remote timestamps? So, if i deploy by creating an archive (tar.gz) and move it up to the server, and then I want to do some local editing, Komodo will still want to push the whole thing because it has no previous information? If this is the case perhaps there needs to be a way to build the cache without pushing, a “reset” or “cache” button or something.

Edit: So i just had a look at the code that @careyh pointed me to and I see what is happening. So yeah, what is tripping me up is I want a button that rebuilds the “_lastChecked” dict but doesn’t move files, basically saying “Everything is in sync right now so build the dict only, don’t push or pull”.

The only thing this would eliminate is the upload/download process. The indexing of a very large (drupal or wordpress for example) project still takes a while. I believe it’s doing a request per file.

You’re really better off to not do the tar.gz upload and just use Komodo to do the whole process. First round takes a little while for very large projects but that’s a one time thing…unless you delete everything on the server for some reason.

  • Carey

Or just use a Version Control system (i.e. Git) which is 1000 times better :stuck_out_tongue:

Thanks. I think it’s perfectly legit use case, to have the files already in place for whatever reason and you want to effectively say, ‘start here’. I can’t figure out how to get at that dict and do the initial syn however. Alas.

@toddw Brilliant :confused:

I said nothing about it not being a legit use case @mtvee.

And on the comment from @toddw, every “publishing” process we have internally and any I’ve used externally (volunteer projects, personal projects, school projects, etc.) all used Source Code Control. It is actually brilliant…try it.

  • Carey

@careyh LOL, just wow dude :slight_smile: