You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by drkemp <gi...@git.apache.org> on 2014/06/16 16:04:46 UTC

[GitHub] cordova-app-harness pull request: [CB6947] move app directory by d...

GitHub user drkemp opened a pull request:

    https://github.com/apache/cordova-app-harness/pull/1

    [CB6947] move app directory by default. for file-by-file use parameter m...

    Change default zip push behavior to move the base directory instead of file-by-file
    This reduces the number of bridge calls and vastly improves performance.
    To force file-by-file (for incremental updates) use parameter merge=xx
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/drkemp/cordova-app-harness master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-app-harness/pull/1.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1
    
----
commit ab2415cf84ae8e83cc9cae931fb9cef0f831507f
Author: David Kemp <dr...@chromium.org>
Date:   2014-06-16T13:46:34Z

    [CB6947] move app directory by default. for file-by-file use parameter merge=

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-app-harness pull request: [CB6947] move app directory by d...

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-app-harness/pull/1#discussion_r13839802
  
    --- Diff: www/cdvah/js/HarnessServer.js ---
    @@ -272,15 +278,30 @@
                         app.updatingStatus = unzipPercentage;
                     })
                     .then(function(zipAssetManifest) {
    -                    var keys = Object.keys(zipAssetManifest);
    -                    return $q.when()
    -                    .then(function next() {
    -                        var k = keys.shift();
    -                        if (k) {
    -                            return importFile(tmpDirUrl + k, zipAssetManifest[k]['path'], app, zipAssetManifest[k]['etag'])
    -                            .then(next);
    -                        }
    -                    });
    +                    if (movetype == 'bulk') {
    +                        console.log('Moving files in bulk');
    +                        return $q.when()
    +                        .then(function(){
    +                            // get the source base path from the first file
    +                            // all files need to be in the same place
    +                            var firstfile = Object.keys(zipAssetManifest)[0];
    +                            var fpath = tmpDirUrl + firstfile;
    +                            var pathendposition = fpath.lastIndexOf(zipAssetManifest[firstfile]['path']);
    +                            var fromurl = fpath.substr(0,pathendposition-1);
    +                            return app.directoryManager.bulkAddFile(zipAssetManifest, fromurl, tmpDirUrl);
    --- End diff --
    
    bulkAddFile takes only 2 parameters. 
    I think fromurl == tmpDirUrl


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-app-harness pull request: [CB6947] move app directory by d...

Posted by drkemp <gi...@git.apache.org>.
Github user drkemp commented on the pull request:

    https://github.com/apache/cordova-app-harness/pull/1#issuecomment-46198612
  
    That was an oops. Meant to change the parameter - change submitted.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-app-harness pull request: [CB6947] move app directory by d...

Posted by clelland <gi...@git.apache.org>.
Github user clelland commented on the pull request:

    https://github.com/apache/cordova-app-harness/pull/1#issuecomment-46182293
  
    Is that literally '`xx`', or is that a placeholder for some other value?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-app-harness pull request: [CB6947] move app directory by d...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-app-harness/pull/1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---