#9 Exclusion/Ignore file

closed
nobody
None
5
2007-12-11
2007-05-04
No

When uploading directories (probably the most common usecase of wput), it would be very helpful if some directories and files could be excluded.
This way, directories like "CVS" or ".xvpics" could be easily ignored and not uploaded.

To continue a good tradition, I propose a special file named ".wputignore" (or "~/.wputignore", or the file named by $WPUTIGNORE_FILE environment variable) to be consulted before uploading. This file, or env. var $WPUTIGNORE is a simple list of names (with patterns) which must be ignored and not uploaded. Directories from this list must not be traversed at all.

Similarly to ".cvsignore", a single "!" character in the ".wputignore" file clears the ignore list for this directory and all it's subdirs.

Discussion

  • The patch

     
    Attachments
  • Logged In: YES
    user_id=618386
    Originator: YES

    Here's a simple patch that adds some of the above mentioned features. Namely: WPUTIGNORE env. var. is checked (as pattern on UNIX platform, as a string on WIN32 platform) and also the file named by WPUTIGNOREFILE env. var. (or default ".wputignore") in the current directory and in the home directory is checked (very unperfomant, but I have no time to do it right)

    File Added: wput-ignore.patch

     
  • Rumpeltux
    Rumpeltux
    2007-12-11

    • status: open --> closed
     
  • Rumpeltux
    Rumpeltux
    2007-12-11

    Logged In: YES
    user_id=989758
    Originator: NO

    I do not really see a very good point for wput to implement this feature, since it allows the file-list to be read from a pipe. So you can use find which supports for exclusion features to give wput the desired input.

     
  • Logged In: NO

    Well, I use this feature very often to exclude files and directories which I don't want to upload. Using find instead would be absolutely uncomfortable for me.