NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Uploaded file indicator


Joined: 17 Feb 2008
Posts: 26
Location: Alrewas, UK
Reply with quote
One of he great timesaving features of PhpED is the 2-click Upload File feature.

Wouldn't it be really great if, like the asterisk on the tab label that indicated when
a file need saving, we had some sort of indicator that showed whether a file needed
uploading?

I'm usually working with several files and they are, of course, often interdependant
on each other. I'm aware that there is an option to upload a whole project or several
files at once. However, quite often I need to delay uploading a file I've been working
on because I need to edit others that would be out of sync if I uploaded immediately.

Several files later, I have forgotten which files need uploading so a marker (perhaps
a red background) to remind me would be most useful.

Cheers

Will
View user's profileFind all posts by qbusterSend private messageVisit poster's websiteAIM Address


Joined: 03 Mar 2007
Posts: 72
Reply with quote
Brilliant Will, This is definitely a great idea!

I concur...Some sort of Sync status indicator for individual files [in edit mode] would be wonderful. I put "in edit mode" in brackets because this would be helpful if it was extended into the project explorer as well. I think Dmitri may tell us his challenge is determining whether the time offsets have been set up correctly to support this option. Otherwise it would be difficult for him to determine "in Sync/Out of Sync" (this might be a cross operating system dilemma, etc.).

Dmitri - I understand your challenges with the FTP protocol implementation problems that are outside your span of control (on the servers you don't control). Some times the time functions are not implemented properly on some servers. Would it be too cumbersome to take control away from the FTP protocol and do this yourself so you might avoid future unforeseen problems (i.e. Feb 29th).

Here is the suggestion: Create a Sync log that contains a UUID, local timestamp in binary form, remote timestamp in binary form.
- Each time the local file is open for editing check the Sync log for diffs if no diffs then do nothing.
- Each time the file is saved during local edit, check the Sync file for diffs and if diffs exists, now flag the the file as "out of sync".
- Each time the file is selected for download check the Sync log for diffs and if there are diffs, alert the user to resolve the diffs first.
- Each time the file is selected for upload check the Sync log for diffs and if there are diffs, alert the user that "the file has changed locally...send changes to server?".

Notice this is not a versioning system. I purposely did not have it go back to the server each time to have it check the server file's time stamp. You could easily do that and I would recommend that to support team development.

Just some rambling.

You thoughts qbuster?

Thanks for listening...

Randy
View user's profileFind all posts by randySend private messageVisit poster's website


Joined: 17 Feb 2008
Posts: 26
Location: Alrewas, UK
Reply with quote
Randy

Interesting points. In my case I don't think there are any difficulties
setting the ftp time differential on my webserver and I am only
writing stuff for my organisation so it might be a simple matter of
comparing times on my machine and my web host.

However, given that there might be a problem setting the time
differential wouldn't it be be possible to ini_set('local_time_diff')
in php.ini and refer to that? That way it would be in complete control
of the developer (and could be a setting in the Account or
Project settings)?

Cheers

Will
View user's profileFind all posts by qbusterSend private messageVisit poster's websiteAIM Address


Joined: 03 Mar 2007
Posts: 72
Reply with quote
This is a very complicated topic...I'll have to defer to Dmitri. A simple solution would be nice. I certainly like you idea though!

Randy
View user's profileFind all posts by randySend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
well, there are many reasons to delay upload until some amout of work is finished. Why not to use smartsync-upload for the project after it's finished?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Mar 2007
Posts: 72
Reply with quote
Your solution already provides the use case you desribe Dmitri and it works great as I use this frequently.

I think what qbuster is requesting is simply an indicator of which file has changed locally but not remotely and show that on the tab of the open file. I extended the use case by adding "also flag the file in the project explorer in some way to indicate which file has changed locally but not remotely".

Did I explain this correctly qbuster?

Randy
View user's profileFind all posts by randySend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It's my understanding that he needs to see "changed" files to make sure that depended files are okay before upload. If so, it can be done easily with source control systems like SVN or CVS. It's where you can retrive status for the files and see all the files in the project that are not updated. So, the workflow would look like below:
-some work is finished
-source control's status is requested
-then all depended files are checked (and fixed if necessary according to the work per p.1)
-then all the changed files are updated to the sourcecontrol
-and project upload is started

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Mar 2007
Posts: 72
Reply with quote
Yes,

That's where I thought you would need to go with this, and where my first post went too ["...not a versioning system..."]. You see qbuster, for the devs it seems necessary to start down the path of integrating a version control system in order to accomodate what seems so simple as validating the question "is the local file really different than the remote file".

OK Dmitri...I see your challenge. It is reasonable that we don't manage every project with SVN though. This would be a nice addition if you could find a way to fit it in (perhaps using the FTP date stamp as simple local->remote diff check to flag the files).

Thanks for the consideration.

Randy
View user's profileFind all posts by randySend private messageVisit poster's website


Joined: 17 Feb 2008
Posts: 26
Location: Alrewas, UK
Reply with quote
dmitri wrote:
well, there are many reasons to delay upload until some amout of work is finished. Why not to use smartsync-upload for the project after it's finished?


Smartsync-upload is a very useful feature but there are scenarios where it isn't appropriate
to upload all files that have been changed and it seems to me that it would be very helpful
if there were markers that showed which files were out-of-sync with the server.

Thanks


Will
View user's profileFind all posts by qbusterSend private messageVisit poster's websiteAIM Address


Joined: 04 Feb 2007
Posts: 11
Reply with quote
I agree, i use a lot the "Smart Sync" feature but unfortunately, there are times it's not appropiate to use. Perhaps, it would be a easier way to implement this new feature just to "remember" which files were modified after the last upload of itself to the server and mark it somehow, nothing fancy or time consuming for the dev team.

Cheers!
View user's profileFind all posts by leorouSend private messageVisit poster's websiteMSN Messenger


Joined: 17 Feb 2008
Posts: 26
Location: Alrewas, UK
Reply with quote
leorou wrote:
I agree, i use a lot the "Smart Sync" feature but unfortunately, there are times it's not appropiate to use. Perhaps, it would be a easier way to implement this new feature just to "remember" which files were modified after the last upload of itself to the server and mark it somehow, nothing fancy or time consuming for the dev team.



I have just realised that it looks like there is an existing mechanism within phpED that
could facilitate marking open files as having been uploaded (or not as may be the case)..

If the Transfer tab is open, it records the date and time of each upload. As right-clicking on
a file tab is the way to upload individual files, would it not be fairly straightforward to change
the colour of that file tab as part of the process of updating the Transfer log? Similarly, if
one has selected to upload all files, would it not be a straightforward process to change the
status of the tabs of all open files?

Regards


Will
View user's profileFind all posts by qbusterSend private messageVisit poster's websiteAIM Address


Joined: 04 Feb 2007
Posts: 11
Reply with quote
That is a great idea Will, I was thinking this feature could be optional, to not disturb others that do not need it.

I hope this could be considered as a feature request.

Bests,
Leonardo.
View user's profileFind all posts by leorouSend private messageVisit poster's websiteMSN Messenger
Uploaded file indicator
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic