| | @@ -343,15 +343,18 @@ |
| 343 | 343 | set ac [open $archive r] |
| 344 | 344 | fconfigure $ac -translation binary |
| 345 | 345 | |
| 346 | 346 | # First traverse the expansion graph, this gives us the |
| 347 | 347 | # revisions in the order we have to expand them, which we do. |
| 348 | + |
| 349 | + set max [llength [$ex nodes]] |
| 350 | + set myimport 0 |
| 348 | 351 | |
| 349 | 352 | gtcore datacmd [mymethod ExpandData] |
| 350 | 353 | gtcore formatcmd [mymethod ExpandFormat] |
| 351 | 354 | gtcore sortcmd [mymethod ExpandSort] |
| 352 | | - gtcore savecmd [mymethod Expand1 $ac $dir] |
| 355 | + gtcore savecmd [mymethod Expand1 $ac $dir $max] |
| 353 | 356 | |
| 354 | 357 | gtcore traverse $ex ; # The graph is gone after the call |
| 355 | 358 | close $ac |
| 356 | 359 | |
| 357 | 360 | # Now traverse the import graph, this builds the instruction |
| | @@ -377,11 +380,13 @@ |
| 377 | 380 | method ExpandSort {graph candidates} { |
| 378 | 381 | # candidates = list(item), item = list(node revnr) |
| 379 | 382 | # Sort by node and revnr -> Trunk revisions come first. |
| 380 | 383 | return [lsort -index 1 -dict [lsort -index 0 -dict $candidates]] |
| 381 | 384 | } |
| 382 | | - method Expand1 {chan dir graph node} { |
| 385 | + method Expand1 {chan dir max graph node} { |
| 386 | + log progress 3 file $myimport $max ; incr myimport |
| 387 | + |
| 383 | 388 | set revnr [$graph node get $node revnr] |
| 384 | 389 | set fname r$revnr |
| 385 | 390 | struct::list assign [$graph node get $node text] offset length |
| 386 | 391 | |
| 387 | 392 | if {$length < 0} { |
| | @@ -392,20 +397,20 @@ |
| 392 | 397 | } |
| 393 | 398 | |
| 394 | 399 | if {![$graph node keyexists $node __base__]} { |
| 395 | 400 | # Full text node. Get the data, decode it, and save. |
| 396 | 401 | |
| 397 | | - log write 2 file {Expanding <$revnr>, full text} |
| 402 | + log write 8 file {Expanding <$revnr>, full text} |
| 398 | 403 | |
| 399 | 404 | fileutil::writeFile -translation binary $dir/$fname $data |
| 400 | 405 | } else { |
| 401 | 406 | # Delta node. __base__ is the name of the file containing |
| 402 | 407 | # the baseline. The patch is at the specified location of |
| 403 | 408 | # the archive file. |
| 404 | 409 | |
| 405 | 410 | set fbase [$graph node get $node __base__] |
| 406 | | - log write 2 file {Expanding <$revnr>, is delta of <$fbase>} |
| 411 | + log write 8 file {Expanding <$revnr>, is delta of <$fbase>} |
| 407 | 412 | |
| 408 | 413 | set base [fileutil::cat -translation binary $dir/$fbase] |
| 409 | 414 | |
| 410 | 415 | # Writing the patch to disk is just for better |
| 411 | 416 | # debugging. It is not used otherwise. |
| 412 | 417 | |