Check-in [4c095502ce]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added support for a timeout for network operations
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4c095502cec7141baf170dd7c21add536bee17e5
User & Date: rkeene 2015-11-04 13:42:40
Context
2016-09-13
18:37
Added support for LetsEncrypt/ACME URLs with flint check-in: 80ce2cfb47 user: rkeene tags: trunk
2015-11-04
13:42
Added support for a timeout for network operations check-in: 4c095502ce user: rkeene tags: trunk
2013-09-02
08:35
Added help on cloning check-in: a234e10513 user: rkeene tags: trunk
Changes

Changes to nano/fossil.php.

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
            chmod("{$this->path}repository", 0555);
        }

        if (!file_exists("{$this->path}{$repo}.fossil")) {
            putenv('HOME=/tmp');
            putenv("USER={$this->user['username']}");
            putenv("GATEWAY_INTERFACE");
            exec("/usr/local/bin/fossil clone -A " . escapeshellarg($this->user['username']) . " " . escapeshellarg($url) . " " . escapeshellarg("{$this->path}{$repo}.fossil"), $output,
                 $return);

            if ($return !== 0) {
                if (file_exists("{$this->path}{$repo}.fossil")) {
                    unlink("{$this->path}{$repo}.fossil");
                }

................................................................................
        }

        if (file_exists("{$this->path}{$repo}.fossil")) {
            putenv('HOME=/tmp');
            putenv("USER={$this->user['username']}");
            putenv("GATEWAY_INTERFACE");
            if ($url == '') {
                exec("/usr/local/bin/fossil pull -R " . escapeshellarg("{$this->path}{$repo}.fossil") . " 2>&1",
                  $output, $return);
            } else {
                exec("/usr/local/bin/fossil pull " . escapeshellarg($url) . " -R " . escapeshellarg("{$this->path}{$repo}.fossil") . " 2>&1",
                  $output, $return);
            }

            $outputstr = join("\n", $output);

            if ($return !== 0) {
                return false;







|







 







|


|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
            chmod("{$this->path}repository", 0555);
        }

        if (!file_exists("{$this->path}{$repo}.fossil")) {
            putenv('HOME=/tmp');
            putenv("USER={$this->user['username']}");
            putenv("GATEWAY_INTERFACE");
            exec("timeout 3600 /usr/local/bin/fossil clone -A " . escapeshellarg($this->user['username']) . " " . escapeshellarg($url) . " " . escapeshellarg("{$this->path}{$repo}.fossil"), $output,
                 $return);

            if ($return !== 0) {
                if (file_exists("{$this->path}{$repo}.fossil")) {
                    unlink("{$this->path}{$repo}.fossil");
                }

................................................................................
        }

        if (file_exists("{$this->path}{$repo}.fossil")) {
            putenv('HOME=/tmp');
            putenv("USER={$this->user['username']}");
            putenv("GATEWAY_INTERFACE");
            if ($url == '') {
                exec("timeout 3600 /usr/local/bin/fossil pull -R " . escapeshellarg("{$this->path}{$repo}.fossil") . " 2>&1",
                  $output, $return);
            } else {
                exec("timeout 3600 /usr/local/bin/fossil pull " . escapeshellarg($url) . " -R " . escapeshellarg("{$this->path}{$repo}.fossil") . " 2>&1",
                  $output, $return);
            }

            $outputstr = join("\n", $output);

            if ($return !== 0) {
                return false;