Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Reverse Order on QStringList slow...?

  1. #21
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: RSync-clone via WebDav - Possible Approaches

    Quote Originally Posted by camel View Post
    I a
    • Trying to create rsync like functionality on top of webdav
    • Trying to use the entity tags as a way to see if a file has changed?


    Simplest way:
    Ignore the entity tag, and only use the last modified date (compare the one from the webdav with the one locally, taking into account the different times of the computers).

    Harder way:
    Store the entity tag of a file together with the lastmodified time of the file(when you knew that the file was identical to the one on the server) and a md5/sha1 sum of the file....;-)
    Bandswitsch !! get the file to check md5 ?? or save md5 key on server && local??
    The last mod time is never same as local file.... time from incomming Put http Method... (upload time stay as lastmod time)


    I test .... i upload a file called: qt4.2compile.txt (ubuntu fetschi package build)
    upload to webdav .....
    http://ppk.ciz.ch/qt_c++/qt4.2compile.txt
    http://ppk.ciz.ch/qt_c++/ dir list time ...

    first upload original file Last mod time 20 Feb 2007 18:41:11
    qt4.2compile.txt

    Propfind http method say .... on first upload ... (last mod is now incomming time & created time...)
    Qt Code:
    1. <D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
    2. <D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
    3. <D:propstat>
    4. <D:prop>
    5. <lp1:resourcetype/>
    6. <lp1:creationdate>2007-02-20T18:41:57Z</lp1:creationdate>
    7. <lp1:getcontentlength>239</lp1:getcontentlength>
    8. <lp1:getlastmodified>Tue, 20 Feb 2007 18:41:57 GMT</lp1:getlastmodified>
    9. <lp1:getetag>"bc4d3-ef-cbea6740"</lp1:getetag>
    10. <lp2:executable>F</lp2:executable>
    11. <D:supportedlock>
    To copy to clipboard, switch view to plain text mode 

    Same file Whithoud chance reupload....

    the same file drag to upload ..... original file Last mod time 20 Feb 2007 18:41:11

    dir list apache2 say 20-Feb-2007 19:46 239 GMT + 1 correct...

    Propfind http method say

    Qt Code:
    1. <D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
    2. <D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
    3. <D:propstat>
    4. <D:prop>
    5. <lp1:resourcetype/>
    6. <lp1:creationdate>2007-02-20T18:46:04Z</lp1:creationdate>
    7. <lp1:getcontentlength>239</lp1:getcontentlength>
    8. <lp1:getlastmodified>Tue, 20 Feb 2007 18:46:04 GMT</lp1:getlastmodified>
    9. <lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag>
    10. <lp2:executable>F</lp2:executable>
    11. <D:supportedlock>
    To copy to clipboard, switch view to plain text mode 

    if i download the file <lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag> stay same...

    Also only this <lp1:getetag> have a working info to check if a remote is newer or the local file....

    Subversion software versioning working on the same way .... why? svn is on top on a webdav server and dir.... propfind http method.... i check code from esvn wo is qt based....

  2. #22
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Reverse Order on QStringList slow...?

    Quote Originally Posted by patrik08 View Post
    The difference is local remove is a function running on self.... and no signal!!!

    function remove( path ) { /* start on top and work to down */
    make ....
    next level remove(here);
    }

    on Remote each action must start a signal go delete and emitter go back to next file or dir ..... /* from down dir comming up at end remove the top folder... */
    So what that there is no signal? As long as you're deleting files, you can queue deletes. And even if you want to have a synchronous flow, you can always emulate it using an event loop, that's what QTestLib does.

  3. #23
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RSync-clone via WebDav - Possible Approaches

    Quote Originally Posted by patrik08 View Post
    Bandswitsch !!
    ???


    Quote Originally Posted by patrik08 View Post
    get the file to check md5 ??
    You do have the file locally. If you just synched the file, you know both are equal, thus you can calculate the md5 of the local file and associate it to the remote etag

    Quote Originally Posted by patrik08 View Post
    or save md5 key on server && local??
    You have the etag to know the state of the server, don't you?



    Quote Originally Posted by patrik08 View Post
    The last mod time is never same as local file....
    time from incomming Put http Method... (upload time stay as lastmod time)
    Well, there are always ways to set the modified time I would think ;-)


    Quote Originally Posted by patrik08 View Post
    I test .... i upload a file called: qt4.2compile.txt
    ok

    Quote Originally Posted by patrik08 View Post
    (ubuntu fetschi package build)
    ???

    Quote Originally Posted by patrik08 View Post
    upload to webdav .....
    http://ppk.ciz.ch/qt_c++/qt4.2compile.txt
    http://ppk.ciz.ch/qt_c++/ dir list time ...

    first upload original file Last mod time 20 Feb 2007 18:41:11
    qt4.2compile.txt

    Propfind http method say .... on first upload ... (last mod is now incomming time & created time...)
    Qt Code:
    1. <D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
    2. <D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
    3. <D:propstat>
    4. <D:prop>
    5. <lp1:resourcetype/>
    6. <lp1:creationdate>2007-02-20T18:41:57Z</lp1:creationdate>
    7. <lp1:getcontentlength>239</lp1:getcontentlength>
    8. <lp1:getlastmodified>Tue, 20 Feb 2007 18:41:57 GMT</lp1:getlastmodified>
    9. <lp1:getetag>"bc4d3-ef-cbea6740"</lp1:getetag>
    10. <lp2:executable>F</lp2:executable>
    11. <D:supportedlock>
    To copy to clipboard, switch view to plain text mode 
    Now you know both files are equal, you calculate the md5 of the file you just uploaded, and correlate it with the etag you get from the server...

    Quote Originally Posted by patrik08 View Post
    Same file Whithoud chance reupload....
    ???

    Quote Originally Posted by patrik08 View Post
    the same file drag to upload ..... original file Last mod time 20 Feb 2007 18:41:11

    dir list apache2 say 20-Feb-2007 19:46 239 GMT + 1 correct...

    Propfind http method say

    Qt Code:
    1. <D:response xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/" xmlns:lp2="http://apache.org/dav/props/">
    2. <D:href>/webdav/qt_c++/qt4.2compile.txt</D:href>
    3. <D:propstat>
    4. <D:prop>
    5. <lp1:resourcetype/>
    6. <lp1:creationdate>2007-02-20T18:46:04Z</lp1:creationdate>
    7. <lp1:getcontentlength>239</lp1:getcontentlength>
    8. <lp1:getlastmodified>Tue, 20 Feb 2007 18:46:04 GMT</lp1:getlastmodified>
    9. <lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag>
    10. <lp2:executable>F</lp2:executable>
    11. <D:supportedlock>
    To copy to clipboard, switch view to plain text mode 

    if i download the file <lp1:getetag>"bc4d3-ef-daa35300"</lp1:getetag> stay same...
    Well, maybe the server is actually checking if the file did change. Even if the modified since was changed (you did try to modify it), the version of the file is still the same. so no error there, see also the RFC:
    A "strong entity tag" may be shared by two entities of a resource only if they are equivalent by octet equality.
    Since your file is equal byte-by-byte, the strong-entity-tag, which your etag is, can remain the same.


    Quote Originally Posted by patrik08 View Post
    Also only this <lp1:getetag> have a working info to check if a remote is newer or the local file....
    ???

    Quote Originally Posted by patrik08 View Post
    Subversion software versioning working on the same way .... why? svn is on top on a webdav server and dir.... propfind http method.... i check code from esvn wo is qt based....
    What does svn have to do with it? What feature of svn do you want to emulate?
    By the way, you can work with svn without webdav. (Even if most people do not ;-)



    What exactly is the problem you are seeing. Take your time please and try to write it in a way that helps me to understand you clearly.

    (Yes, it is hard to write things down in a precise way, especially when english is not your native language. Mine is german by the way :-)

  4. #24
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: RSync-clone via WebDav - Possible Approaches

    Quote Originally Posted by camel View Post
    ???
    What exactly is the problem you are seeing. Take your time please and try to write it in a way that helps me to understand you clearly.
    (Yes, it is hard to write things down in a precise way, especially when english is not your native language. Mine is german by the way :-)
    Mine native is Italian - Swiss-German - Portuguese .... now the problem to RSync folder is of topic here.... i hope to find an answer on apache2 mod_dav or on subversion... documentation... tanks...

  5. #25
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RSync-clone via WebDav - Possible Approaches

    Quote Originally Posted by patrik08 View Post
    Mine native is Italian - Swiss-German - Portuguese
    Nice selection ;-)

    Quote Originally Posted by patrik08 View Post
    .... now the problem to RSync folder is of topic here.... i hope to find an answer on apache2 mod_dav or on subversion... documentation... tanks...
    Good luck with that :-)

Similar Threads

  1. QStringList in QObject::connect
    By DPinLV in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2006, 17:01
  2. Cannot queue arguments of type 'QStringList'
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2006, 20:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.