1. Erik Bray
  2. virtualenvwrapper-csh
  3. Pull requests

Pull requests

#2 Merged

Updated up to tag 3.6 of upstream

  1. Rui Pereira

Hi. I updated my fork up to the tag 3.6 of upstream. It's the first time I'm using hg so I messed a bit in the branching and merging but things look OK now. Could you take a look and test it (on a dev branch preferentially)? I haven't found any bug for now, but I haven't tested extensively things like projects. Cheers.

Comments (4)

  1. Erik Bray repo owner

    Hey, sorry it took me so long to get to this. It looks like you did a lot of work on this. Just a couple questions:

    Did you ever fix the bug you found in mktempenv? What was the bug? I haven't had a close look at that command yet.

    What's the comment in lsvirtualenv about? What was it that you couldn't understand?

    Other than that everything looks great! Thanks again for all the work you did on this. I remember several months ago I started trying to update venvw-csh but there were several new commands I needed to rewrite in csh, and it's always such a painful thing to do I just threw up my hands at the time, because I didn't have time for it.

    Since this is too much to scrutinize super-closely I'm going to go ahead and merge and we can smooth out any issues as they come up.

  2. Rui Pereira author

    Hi. It's been a while and I had no time in between to get back to it, but some code in mktempenv was still in bash. Here is the diff, I have not updated my branch yet:

    diff -r aa53301a6f2a virtualenvwrapper/virtualenvwrapper.csh/mktmpenv
    --- a/virtualenvwrapper/virtualenvwrapper.csh/mktmpenv  Fri Jan 18 17:44:13 2013 +0100
    +++ b/virtualenvwrapper/virtualenvwrapper.csh/mktmpenv  Fri Feb 15 20:10:50 2013 +0100
    @@ -1,6 +1,6 @@
     # Generate a unique temporary name
     # RP: csh cannot redirect only stderr, so doing things a bit diferently
    -"$VIRTUALENVWRAPPER_PYTHON" -c 'import uuid,sys; sys.stdout.write(str(uuid.uuid4())+"\n")'
    +"$VIRTUALENVWRAPPER_PYTHON" -c 'import uuid,sys; sys.stdout.write(str(uuid.uuid4())+"\n")' >& /dev/null
     @ RC = $?
     if ( "$RC" == "0" ) then
         set tmpenvname = `"$VIRTUALENVWRAPPER_PYTHON" -c 'import uuid,sys; sys.stdout.write(str(uuid.uuid4())+"\n")'`
    @@ -10,12 +10,12 @@
     # Create the environment
    -mkvirtualenv "$@" "$tmpenvname"
    +mkvirtualenv $* "$tmpenvname"
     @ RC = $?
     if ( "$RC" != "0" ) then
         unset tmpenvname
         exit $RC
     # Change working directory
    @@ -25,9 +25,8 @@
     # Update the postdeactivate script
     cat - >> "$VIRTUAL_ENV/bin/postdeactivate" <<EOF
    -if [ -f "$VIRTUAL_ENV/README.tmpenv" ]
    -    echo "Removing temporary environment:" $(basename "$VIRTUAL_ENV")
    -    rmvirtualenv $(basename "$VIRTUAL_ENV")
    +if ( -f "$VIRTUAL_ENV/README.tmpenv" ) then
    +    echo "Removing temporary environment:" `basename "$VIRTUAL_ENV"`
    +    rmvirtualenv `basename "$VIRTUAL_ENV"`

    Nevertheless mktmpenv still bugs when deleting the temporary directory, maybe you can figure that out. The comment on lsvirtualenv is about the need of case --, I really don't know if there's a proper way to catch that.