<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch vcs-fetch
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/3c9ace06293dca619cf3fe87dd71642cfac5b1ff">https://github.com/macports/macports-base/commit/3c9ace06293dca619cf3fe87dd71642cfac5b1ff</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 3c9ace06293dca619cf3fe87dd71642cfac5b1ff
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Mon Apr 2 02:40:18 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> fetch: Create temporary export inside workpath
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This simplifies cleanup, as 'port clean' will eventually remove this
</span><span style='display:block; white-space:pre;color:#404040;'> directory. Also, this allows to examine the state in the filesystem in
</span><span style='display:block; white-space:pre;color:#404040;'> case of errors.
</span>---
src/port1.0/portfetch.tcl | 105 +++++++++++++++++++---------------------------
1 file changed, 44 insertions(+), 61 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portfetch.tcl b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 2b9f6e0..278dc72 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -381,7 +381,7 @@ proc portfetch::mktar {tarfile dir mtime {excludes {}}} {
</span> # Perform a bzr fetch
proc portfetch::bzrfetch {args} {
global UI_PREFIX \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- env distpath worksrcpath \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env distpath workpath worksrcpath \
</span> bzr.cmd bzr.url bzr.revision bzr.file bzr.file_prefix \
name distname fetch.type
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -412,27 +412,25 @@ proc portfetch::bzrfetch {args} {
</span>
try -pass_signal {
ui_info "$UI_PREFIX Checking out ${fetch.type} repository"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmppath [mkdtemp "/tmp/macports.portfetch.${name}.XXXXXXXX"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmpxprt [file join ${tmppath} export]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir ${tmpxprt}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${bzr.cmd} --builtin --no-aliases checkout --lightweight --verbose -r ${bzr.revision} ${bzr.url} ${tmpxprt}/${bzr.file_prefix} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exportpath [file join ${workpath} export]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${exportpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${bzr.cmd} --builtin --no-aliases checkout --lightweight --verbose -r ${bzr.revision} ${bzr.url} ${exportpath}/${bzr.file_prefix} 2>&1"
</span> if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> error [msgcat::mc "Bazaar checkout failed"]
}
if {![bzr_tarballable]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file rename ${tmpxprt}/${bzr.file_prefix} ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${exportpath}/${bzr.file_prefix} ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${exportpath}
</span> return 0
}
ui_info "$UI_PREFIX Generating tarball ${bzr.file}"
# get timestamp of latest revision
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${bzr.cmd} --builtin --no-aliases version-info --format=custom --template=\"{date}\" ${tmpxprt}/${bzr.file_prefix}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${bzr.cmd} --builtin --no-aliases version-info --format=custom --template=\"{date}\" ${exportpath}/${bzr.file_prefix}"
</span> ui_debug "exec: $cmdstring"
if {[catch {exec -ignorestderr sh -c $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> error [msgcat::mc "Bazaar version-info failed: $result"]
}
set tstamp $result
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -440,14 +438,14 @@ proc portfetch::bzrfetch {args} {
</span>
set tardst [join [list [mktemp "/tmp/macports.portfetch.${name}.XXXXXXXX"] ".tar"] ""]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- mktar $tardst $tmpxprt $mtime [list "${bzr.file_prefix}/.bzr"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mktar $tardst $exportpath $mtime [list "${bzr.file_prefix}/.bzr"]
</span> set compressed [compressfile ${tardst}]
file rename -force ${compressed} ${generatedfile}
ui_debug "Created tarball for fetch.type ${fetch.type} at ${generatedfile}"
# cleanup
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${exportpath}
</span>
return 0
} catch {{*} eCode eMessage} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -506,17 +504,15 @@ proc portfetch::cvsfetch {args} {
</span> set env(CVS_RSH) ssh
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmppath [mkdtemp "/tmp/macports.portfetch.${name}.XXXXXXXX"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmpxprt [file join ${tmppath} export]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file mkdir ${tmpxprt}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exportpath [file join ${workpath} export]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${exportpath}
</span> set cmdstring "${cvs.cmd} -z9 -f -d ${cvs.root} export -d ${cvs.file_prefix} ${cvs.args} ${cvs.module} 2>&1"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system -notty -W ${tmpxprt} $cmdstring} result]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system -notty -W ${exportpath} $cmdstring} result]} {
</span> error [msgcat::mc "CVS checkout failed"]
}
if {![cvs_tarballable]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file rename ${tmpxprt}/${cvs.file_prefix} ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${exportpath}/${cvs.file_prefix} ${worksrcpath}
</span> return 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -524,7 +520,7 @@ proc portfetch::cvsfetch {args} {
</span>
# get timestamp by looking for the newest file in the exported source
set mtime 0
<span style='display:block; white-space:pre;background:#ffe0e0;'>- fs-traverse f ${tmpxprt}/${cvs.file_prefix} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse f ${exportpath}/${cvs.file_prefix} {
</span> if {![file isdirectory $f]} {
set ft [file mtime $f]
if {$ft > $mtime} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -535,17 +531,17 @@ proc portfetch::cvsfetch {args} {
</span>
set tardst [join [list [mktemp "/tmp/macports.portfetch.${name}.XXXXXXXX"] ".tar"] ""]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- mktar $tardst $tmpxprt $mtime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mktar $tardst $exportpath $mtime
</span> set compressed [compressfile ${tardst}]
file rename -force ${compressed} ${generatedfile}
ui_debug "Created tarball for fetch.type ${fetch.type} at ${generatedfile}"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # cleanup
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${exportpath}
</span> } catch {{*} ecode emessage} {
throw
} finally {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # cleanup
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> array unset env *
array set env [array get orig_env]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -602,32 +598,28 @@ proc portfetch::svnfetch {args} {
</span> set proxy_args [svn_proxy_args ${svn.url}]
ui_info "$UI_PREFIX Checking out ${fetch.type} repository"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmppath [mkdtemp "/tmp/macports.portfetch.${name}.XXXXXXXX"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmpxprt [file join ${tmppath} export]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exportpath [file join ${workpath} export]
</span> if {${svn.subdirs} eq ""} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${svn.cmd} --non-interactive ${proxy_args} export ${svn.url} ${tmpxprt}/${svn.file_prefix} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${svn.cmd} --non-interactive ${proxy_args} export ${svn.url} ${exportpath}/${svn.file_prefix} 2>&1"
</span> if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Subversion checkout failed"]
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${svn.cmd} --non-interactive ${proxy_args} checkout --depth empty ${svn.url} ${tmpxprt}/${svn.file_prefix} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${svn.cmd} --non-interactive ${proxy_args} checkout --depth empty ${svn.url} ${exportpath}/${svn.file_prefix} 2>&1"
</span> if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Subversion checkout failed"]
}
foreach dir ${svn.subdirs} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${svn.cmd} --non-interactive ${proxy_args} update --depth infinity ${tmpxprt}/${svn.file_prefix}/${dir} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${svn.cmd} --non-interactive ${proxy_args} update --depth infinity ${exportpath}/${svn.file_prefix}/${dir} 2>&1"
</span> if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Subversion update for subdir $dir failed"]
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file delete -force ${tmpxprt}/${svn.file_prefix}/.svn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${exportpath}/${svn.file_prefix}/.svn
</span> }
if {![svn_tarballable]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file rename ${tmpxprt}/${svn.file_prefix} ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${exportpath}/${svn.file_prefix} ${worksrcpath}
</span> return 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -636,7 +628,6 @@ proc portfetch::svnfetch {args} {
</span> # get timestamp of latest revision
set cmdstring "${svn.cmd} --non-interactive ${proxy_args} info --show-item last-changed-date ${svn.url}"
if {[catch {exec -ignorestderr sh -c $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Subversion info failed"]
}
set tstamp $result
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -644,14 +635,14 @@ proc portfetch::svnfetch {args} {
</span>
set tardst [join [list [mktemp "/tmp/macports.portfetch.${name}.XXXXXXXX"] ".tar"] ""]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- mktar $tardst $tmpxprt $mtime [list "${svn.file_prefix}/.svn"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mktar $tardst $exportpath $mtime [list "${svn.file_prefix}/.svn"]
</span> set compressed [compressfile ${tardst}]
file rename -force ${compressed} ${generatedfile}
ui_debug "Created tarball for fetch.type ${fetch.type} at ${generatedfile}"
# cleanup
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${exportpath}
</span>
return 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -768,10 +759,9 @@ proc portfetch::gitfetch {args} {
</span> #append options " --branch ${git.branch}"
ui_info "$UI_PREFIX Cloning ${fetch.type} repository"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmppath [mkdtemp "/tmp/macports.portfetch.${name}.XXXXXXXX"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${git.cmd} clone -q $options ${git.url} ${tmppath} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exportpath [file join ${workpath} export]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${git.cmd} clone -q $options ${git.url} ${exportpath} 2>&1"
</span> if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Git clone failed"]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -780,24 +770,22 @@ proc portfetch::gitfetch {args} {
</span> if {${git.branch} ne ""} {
ui_debug "Checking out branch ${git.branch}"
set cmdstring "${git.cmd} checkout -q ${git.branch} 2>&1"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system -W $tmppath $cmdstring} result]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete $tmppath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system -W $exportpath $cmdstring} result]} {
</span> return -code error [msgcat::mc "Git checkout failed"]
}
}
# fetch all submodules
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[file isfile "$tmppath/.gitmodules"] && [tbool git.fetch_submodules]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file isfile "$exportpath/.gitmodules"] && [tbool git.fetch_submodules]} {
</span> ui_info "$UI_PREFIX Cloning git submodules"
set cmdstring "${git.cmd} submodule -q update --init --recursive 2>&1"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system -W $tmppath $cmdstring} result]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system -W $exportpath $cmdstring} result]} {
</span> return -code error [msgcat::mc "Git submodule init failed"]
}
}
if {![git_tarballable]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file rename ${tmppath} ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${exportpath} ${worksrcpath}
</span> return 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -806,18 +794,17 @@ proc portfetch::gitfetch {args} {
</span> # generate main tarball
set tardst [join [list [mktemp "/tmp/macports.portfetch.${name}.XXXXXXXX"] ".tar"] ""]
set cmdstring "${git.cmd} archive --format=tar --prefix=\"${git.file_prefix}/\" --output=${tardst} ${git.branch} 2>&1"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system -W $tmppath $cmdstring} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system -W $exportpath $cmdstring} result]} {
</span> delete $tardst
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete $tmppath
</span> return -code error [msgcat::mc "Git archive creation failed"]
}
# generate tarballs for submodules and merge them into the main tarball
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[file isfile "$tmppath/.gitmodules"] && [tbool git.fetch_submodules]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file isfile "$exportpath/.gitmodules"] && [tbool git.fetch_submodules]} {
</span> set xz [findBinary xz ${portutil::autoconf::xz_path}]
# TODO: add dependency on libarchive, if /usr/bin/tar is not bsdtar
set tar [findBinary bsdtar tar]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # determine tmppath again in shell, as the real path might be different
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # determine exportpath again in shell, as the real path might be different
</span> # due to symlinks (/tmp vs. /private/tmp), pass it as MPTOPDIR in
# environment
set cmdstring [join [list \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -826,9 +813,8 @@ proc portfetch::gitfetch {args} {
</span> "${git.cmd} archive --format=tar --prefix=\"${git.file_prefix}/\${PWD#\$MPTOPDIR/}/\" \$sha1 " \
"| tar -uf ${tardst} @-" \
"' 2>&1"] ""]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {system -W $tmppath $cmdstring} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {system -W $exportpath $cmdstring} result]} {
</span> delete $tardst
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete $tmppath
</span> return -code error [msgcat::mc "Git submodule archive creation failed"]
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -840,7 +826,7 @@ proc portfetch::gitfetch {args} {
</span> ui_debug "Created tarball for fetch.type ${fetch.type} at ${generatedfile}"
# cleanup
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${exportpath}
</span>
return 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -848,7 +834,7 @@ proc portfetch::gitfetch {args} {
</span> # Perform a mercurial fetch.
proc portfetch::hgfetch {args} {
global UI_PREFIX \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- distpath worksrcpath \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ distpath workpath worksrcpath \
</span> hg.cmd hg.url hg.tag hg.file hg.file_prefix \
name distname fetch.type fetch.ignore_sslcert
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -865,39 +851,36 @@ proc portfetch::hgfetch {args} {
</span> set insecureflag " --insecure"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmppath [mkdtemp "/tmp/macports.portfetch.${name}.XXXXXXXX"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set tmpxprt [file join ${tmppath} export]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${hg.cmd} clone${insecureflag} --rev \"${hg.tag}\" ${hg.url} ${tmpxprt}/${hg.file_prefix} 2>&1"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set exportpath [file join ${workpath} export]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${hg.cmd} clone${insecureflag} --rev \"${hg.tag}\" ${hg.url} ${exportpath}/${hg.file_prefix} 2>&1"
</span> if {[catch {system $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Mercurial clone failed"]
}
if {![hg_tarballable]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- file rename ${tmpxprt}/${hg.file_prefix} ${worksrcpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${exportpath}/${hg.file_prefix} ${worksrcpath}
</span> return 0
}
ui_info "$UI_PREFIX Generating tarball ${hg.file}"
# get timestamp of latest revision
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdstring "${hg.cmd} log -r ${hg.tag} --template=\"{date}\"i -R ${tmpxprt}/${hg.file_prefix}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdstring "${hg.cmd} log -r ${hg.tag} --template=\"{date}\"i -R ${exportpath}/${hg.file_prefix}"
</span> if {[catch {exec -ignorestderr sh -c $cmdstring} result]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span> return -code error [msgcat::mc "Mercurial log failed"]
}
set mtime $result
set tardst [join [list [mktemp "/tmp/macports.portfetch.${name}.XXXXXXXX"] ".tar"] ""]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- mktar $tardst $tmpxprt $mtime [list "${hg.file_prefix}/.hg"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mktar $tardst $exportpath $mtime [list "${hg.file_prefix}/.hg"]
</span> set compressed [compressfile ${tardst}]
file rename -force ${compressed} ${generatedfile}
ui_debug "Created tarball for fetch.type ${fetch.type} at ${generatedfile}"
# cleanup
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${tmppath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${exportpath}
</span>
return 0
}
</pre><pre style='margin:0'>
</pre>