[Bug 425510] Re: 'bzr mv' should do wildcard expansion on windows

Maritza Mendez martitzam at gmail.com
Fri Sep 11 18:45:42 BST 2009


Apologies in advance for top-posting.  I'm going to insert my comments into
the stream, below.  ~M


On Fri, Sep 11, 2009 at 5:18 AM, Vincent Ladeuil
<v.ladeuil+lp at free.fr<v.ladeuil%2Blp at free.fr>
> wrote:

> >>>>> "Maritza" == Maritza Mendez <martitzam at gmail.com> writes:
>
> <snip/>
>
> <blush> Sorry, I didn't realize you had put that in the bug
> reports already.
>
>
~M : That's ok.  We're actually talking about two almost identical bugs
anyway, and it helps the discussion to copy them here.



> Anyway, you slightly edited them below, which is interesting with
> regard to how we want to handle the shell-like scripts:
>
>
~M : Yes, that's correct.  The shell scripts I used to "test" my fixes were
slightly more compact than the ones I used to find the bugs.  :)


>    bug> C:\>mkdir t
>    bug> C:\>cd t
>    bug> C:\t>bzr init
>    bug> Created a standalone tree (format: pack-0.92)
>    bug> C:\t>echo > cat.txt
>    bug> C:\t>echo > dog.txt
>    bug> C:\t>mkdir pets
>    bug> C:\t>bzr add *.txt
>    bug> adding cat.txt
>    bug> adding dog.txt
>    bug> C:\t>bzr add pets
>    bug> adding pets
>    bug> C:\t>bzr mv *.txt .\pets
>    bug> bzr: ERROR: Could not move *.txt => pets: *.txt is not versioned.
>
>    mail> # test for 'bzr mv' [Bug 425510]
>    mail> mkdir t
>    mail> cd t
>    mail> bzr init
>    mail> echo > cat.txt
>    mail> echo > dog.txt
>    mail> bzr add *.txt
>    mail> bzr mkdir pets
>    mail> bzr mv *.txt .\pets
>
> pslt == proposed shell-like tests:
>
>
~M : Cool.  I was looking over a few of the blackbox tests and wondering,
"How should I approach this for these new bugs?"
~M : Yikes!  Let's not name the tests or fixes after me.  That means we'd
have to name the bugs after me, too.
~M : Don't need nobody asking "Who's this crazy Martitza?"  :)


>    pslt> class TestMaritza(script.TestCaseWithTransportAndScript):
>
>    pslt>     def test_425510_mv(self):
>    pslt>         story = """
>    pslt> mkdir t
>    pslt> cd t
>    pslt> bzr init
>    pslt> echo > cat.txt
>    pslt> echo > dog.txt
>    pslt> bzr add cat.txt dog.txt
>    pslt> bzr mkdir pets
>    pslt> bzr mv *.txt pets
>    pslt> """
>    pslt>         self.run_script(story)
>
> gives:
>
> AssertionError: In <bzr mv *.txt pets>, unexpected error: bzr: ERROR: Could
> not move *.txt => pets: *.txt is not versioned.
>
>
>    bug> C:>mkdir t
>    bug> C:>cd t
>    bug> C:\t>bzr init
>    bug> Created a standalone tree (format: pack-0.92)
>    bug> C:\t>echo > cat.txt
>    bug> C:\t>echo > bat.txt
>    bug> C:\t>bzr add
>    bug> adding bat.txt
>    bug> adding cat.txt
>    bug> C:\t>bzr commit -m "import" Committing to: C:/t/ added bat.txt
> added cat.txt Committed revision 1.
>    bug> C:\t>bzr rm *.txt
>    bug> bzr: ERROR: [Error 123] The filename, directory name, or volume
> label syntax is incorrect: u'C:/t/*.txt\\*.*'
>
>
>    mail> #test for 'bzr rm' [Bug 426410]
>    mail> mkdir t
>    mail> cd t
>    mail> bzr init
>    mail> echo > cat.txt
>    mail> echo > dog.txt
>    mail> bzr add *.txt
>    mail> bzr rm *.txt
>
>    pslt>     def test_426410_rm(self):
>    pslt>         story = """
>    pslt> mkdir t
>    pslt> cd t
>    pslt> bzr init
>    pslt> echo > cat.txt
>    pslt> echo > dog.txt
>    pslt> bzr add cat.txt dog.txt
>    pslt> bzr rm --force *.txt
>    pslt> 2>deleted dog.txt
>    pslt> 2>deleted cat.txt
>    pslt> """
>    pslt>         self.run_script(story)
>
> gives:
>
> AssertionError: texts not equal:
> + *.txt does not exist.
> - deleted dog.txt
> - deleted cat.txt
>
>
> The version I used to run the example above is only slightly
> different than the one waiting review (hint, hint, nudge :-).
>
>
~M : Hint taken.  :)
~M : I do apologize -- My day job isn't as much fun as bzr but it is winning
this week.
~M : It sounds like you actually have the bugs fixed.  I would not be
bothered one bit if you just did it.
~M : I know this sounds lazy.  Shame on me!


> I cheated a little because the shell-like tests didn't handle
> glob so far (haha aren't life funny ?) and I had to fix a bug too
> ('> cat.txt' wasn't handled as '>cat.txt').
>
>
~M : Nice catch!


> But both tests are failing right now and for the right cause: no
> glob handling at the shell level.
>
> Also note that except for your prompts, you can specify the
> expected outputs or errors exactly as they appear in your initial
> report.
>
> Thoughts ?
>
>
~M : Thank you very much for taking an interest and acting.
~M : Extra thanks for not just doing it, but also providing feedback so that
I can contribute more effectively in the future!


>          Vincent
>
> P.S.: The updated branch is at lp:~vila/bzr/shell-like-tests
> P.P.S.: Will look into that glob handling for the tests now.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090911/bd465de8/attachment-0002.htm 


More information about the bazaar mailing list