Opened at 2012-09-14T12:18:29Z
Closed at 2012-11-22T01:32:52Z
#1805 closed defect (fixed)
tahoe cp verbose counts from 0 to n-1 of n
Reported by: | ChosenOne | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | code-frontend-cli | Version: | 1.9.2 |
Keywords: | reviewed | Cc: | |
Launchpad Bug: |
Description
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.
Attachments (2)
Change History (10)
Changed at 2012-09-14T12:20:50Z by ChosenOne
comment:1 Changed at 2012-09-14T16:41:56Z by zooko
- Keywords test-needed added
Thank you for the patch, ChosenOne! This needs a unit test. Here are the extant tests 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.
comment:2 Changed at 2012-09-14T17:49:02Z by ChosenOne
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. [Now removed --davidsarah]
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 :)
comment:3 Changed at 2012-09-14T21:07:57Z by davidsarah
- Keywords review-needed added; test-needed removed
- Milestone changed from undecided to 1.10.0
- Owner set to davidsarah
- Priority changed from minor to normal
- Status changed from new to assigned
comment:4 Changed at 2012-09-14T21:11:46Z by davidsarah
- Keywords reviewed added; review-needed removed
The test patch adds extraneous whitespace on a blank line.
Other than that +1, good to apply.
comment:5 Changed at 2012-09-15T14:00:50Z by ChosenOne
Thanks for the review.
comment:6 Changed at 2012-09-28T16:25:39Z by davidsarah
- Owner davidsarah deleted
- Status changed from assigned to new
comment:7 Changed at 2012-11-22T01:32:40Z by davidsarah
Fixed in 595d611c9b4b29c8.
comment:8 Changed at 2012-11-22T01:32:52Z by davidsarah
- Resolution set to fixed
- Status changed from new to closed
suggested patch