tahoe cp verbose counts from 0 to n-1 of n #1805

Closed
opened 2012-09-14 12:18:29 +00:00 by ChosenOne · 7 comments
ChosenOne commented 2012-09-14 12:18:29 +00:00
Owner

When I use "tahoe cp" to copy files, it gives messages like

 examining 0 of 2
 examining 1 of 2

It's a simple off by one.

patch attached.

When I use "tahoe cp" to copy files, it gives messages like ``` examining 0 of 2 examining 1 of 2 ``` It's a simple off by one. patch attached.
tahoe-lafs added the
code-frontend-cli
minor
defect
1.9.2
labels 2012-09-14 12:18:29 +00:00
tahoe-lafs added this to the undecided milestone 2012-09-14 12:18:29 +00:00
ChosenOne commented 2012-09-14 12:20:50 +00:00
Author
Owner

Attachment tahoe_cp.py.patch (1863 bytes) added

suggested patch

**Attachment** tahoe_cp.py.patch (1863 bytes) added suggested patch
zooko commented 2012-09-14 16:41:56 +00:00
Author
Owner

Thank you for the patch, ChosenOne! This needs a unit test. Here are the extant [tests]source:src/allmydata/test/test_cli.py@20120904224538-66853-76911c7a332d6d1a5d5be880a192e4e9d05c155f#L1891 of the tahoe cp command. Someone (possibly you, ChosenOne) needs to make a method of class Cp which copies more than one file, and fails unless the stdout has the right count in it. Note that the do_cli helper function that is already defined in test_cli.py captures stdout by default and passes it as the second argument to the callback.

Thank you for the patch, ChosenOne! This needs a unit test. Here are the extant [tests]source:src/allmydata/test/test_cli.py@20120904224538-66853-76911c7a332d6d1a5d5be880a192e4e9d05c155f#L1891 of the `tahoe cp` command. Someone (possibly you, ChosenOne) needs to make a method of `class Cp` which copies more than one file, and fails unless the stdout has the right count in it. Note that the `do_cli` helper function that is already defined in `test_cli.py` captures stdout by default and passes it as the second argument to the callback.
ChosenOne commented 2012-09-14 17:47:14 +00:00
Author
Owner

Attachment test_cli.patch (848 bytes) added

patch file for test

**Attachment** test_cli.patch (848 bytes) added patch file for test
ChosenOne commented 2012-09-14 17:49:02 +00:00
Author
Owner

sorry for the confusion: I did not find the button to remove a patch, so now I uploaded a second patch file for test_cli.py. [removed --davidsarah]Now

the most recent one (test_cli.patch) works and yields a success when running
make quicktest TEST=allmydata.test.test_cli.Cp.test_copy_using_filecap :)

sorry for the confusion: I did not find the button to remove a patch, so now I uploaded a second patch file for test_cli.py. [removed --davidsarah]Now the most recent one (test_cli.patch) works and yields a success when running `make quicktest TEST=allmydata.test.test_cli.Cp.test_copy_using_filecap` :)
tahoe-lafs added
normal
and removed
minor
labels 2012-09-14 21:07:57 +00:00
tahoe-lafs modified the milestone from undecided to 1.10.0 2012-09-14 21:07:57 +00:00
davidsarah commented 2012-09-14 21:11:46 +00:00
Author
Owner

The test patch adds extraneous whitespace on a blank line.

Other than that +1, good to apply.

The test patch adds extraneous whitespace on a blank line. Other than that +1, good to apply.
ChosenOne commented 2012-09-15 14:00:50 +00:00
Author
Owner

Thanks for the review.

Thanks for the review.
davidsarah commented 2012-11-22 01:32:40 +00:00
Author
Owner

Fixed in changeset:595d611c9b4b29c8.

Fixed in changeset:595d611c9b4b29c8.
tahoe-lafs added the
fixed
label 2012-11-22 01:32:52 +00:00
davidsarah closed this issue 2012-11-22 01:32:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1805
No description provided.