Commits

Anonymous committed 2cf2273

Rename hook to pre_workon. Revert fixes to whitespace

Comments (0)

Files changed (3)

     # Scan the input for package information
     # to grab any data files (text, images, etc.)
     # associated with sub-packages.
-    package_data=find_package_data(PROJECT,
+    package_data=find_package_data(PROJECT, 
                                    package=PROJECT,
                                    only_in_packages=False,
                                    ),
         'virtualenvwrapper.pre_activate': [
             'user_scripts = virtualenvwrapper.user_scripts:pre_activate',
             ],
-        'virtualenvwrapper.pre_activate_lookup': [
-            'user_scripts = virtualenvwrapper.user_scripts:pre_activate_lookup',
+        'virtualenvwrapper.pre_workon': [
+            'user_scripts = virtualenvwrapper.user_scripts:pre_workon',
             ],
         'virtualenvwrapper.post_activate_source': [
             'user_scripts = virtualenvwrapper.user_scripts:post_activate_source',

virtualenvwrapper.sh

     elif [ "${1}" = "initialize" ]
     then
         cat - 1>&2 <<EOF
-virtualenvwrapper.sh: There was a problem running the initialization hooks.
+virtualenvwrapper.sh: There was a problem running the initialization hooks. 
 
 If Python could not import the module virtualenvwrapper.hook_loader,
 check that virtualenv has been installed for
 # List the available environments.
 function virtualenvwrapper_show_workon_options {
     virtualenvwrapper_verify_workon_home || return 1
-    # NOTE: DO NOT use ls or cd here because colorized versions spew control
+    # NOTE: DO NOT use ls or cd here because colorized versions spew control 
     #       characters into the output list.
     # echo seems a little faster than find, even with -depth 3.
     #
     # 2. Strip the WORKON_HOME prefix from each name.
     # 3. Strip the bindir/activate script suffix.
     # 4. Format the output to show one name on a line.
-    # 5. Eliminate any lines with * on them because that means there
+    # 5. Eliminate any lines with * on them because that means there 
     #    were no envs.
     (echo $WORKON_HOME/*/$VIRTUALENVWRAPPER_ENV_BIN_DIR/activate) 2>/dev/null \
         | command \sed "s|$WORKON_HOME/||g" \
         return 1
     fi
 
-    virtualenvwrapper_run_hook "pre_activate_lookup" "$env_name"
-
     virtualenvwrapper_verify_workon_home || return 1
+    virtualenvwrapper_run_hook "pre_workon" "$env_name"
     virtualenvwrapper_verify_workon_environment $env_name || return 1
 
     activate="$WORKON_HOME/$env_name/$VIRTUALENVWRAPPER_ENV_BIN_DIR/activate"
     typeset src_name="$1"
     typeset trg_name="$2"
     typeset src
-    typeset trg
+    typeset trg 
 
     # without a source there is nothing to do
     if [ "$src_name" = "" ]; then
 
     echo "Copying $src_name as $trg_name..."
     (
-        [ -n "$ZSH_VERSION" ] && setopt SH_WORD_SPLIT
+        [ -n "$ZSH_VERSION" ] && setopt SH_WORD_SPLIT 
         virtualenvwrapper_cd "$WORKON_HOME" &&
-        "$VIRTUALENVWRAPPER_VIRTUALENV_CLONE" "$src" "$trg"
-        [ -d "$trg" ] &&
+        "$VIRTUALENVWRAPPER_VIRTUALENV_CLONE" "$src" "$trg" 
+        [ -d "$trg" ] && 
             virtualenvwrapper_run_hook "pre_cpvirtualenv" "$src" "$trg_name" &&
             virtualenvwrapper_run_hook "pre_mkvirtualenv" "$trg_name"
     )

virtualenvwrapper/user_scripts.py

     return
 
 
-def pre_activate_lookup(args):
-    log.debug('pre_activate_lookup')
-    run_global('pre_activate_lookup', *args)
+def pre_workon(args):
+    log.debug('pre_workon')
+    run_global('pre_workon', *args)
     return
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.