Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
trac /
contrib /
[ HOME SHELL ]
Name
Size
Permission
Action
sqlitetopgscript
[ DIR ]
drwxr-xr-x
travis
[ DIR ]
drwxr-xr-x
workflow
[ DIR ]
drwxr-xr-x
README
322
B
-rw-r--r--
appveyor.ps1.gz
3.9
KB
-rw-r--r--
checksum.py
1.15
KB
-rw-r--r--
checkwiki.py.gz
2.37
KB
-rw-r--r--
htdigest.py
3.71
KB
-rw-r--r--
htpasswd.py.gz
1.5
KB
-rw-r--r--
jinjachecker.py.gz
5.09
KB
-rw-r--r--
l10n_diff_index.py
3
KB
-rw-r--r--
l10n_reset_en_GB.py
2.14
KB
-rw-r--r--
l10n_revert_lineno_conflicts.p...
2.17
KB
-rw-r--r--
make_status.py
3.48
KB
-rw-r--r--
merge_catalog.py.gz
1.64
KB
-rw-r--r--
trac-pre-commit-hook
2.35
KB
-rw-r--r--
trac-svn-hook.gz
3.09
KB
-rw-r--r--
trac-svn-post-commit-hook.cmd
3.19
KB
-rw-r--r--
wiki2rst.py.gz
1.74
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : trac-pre-commit-hook
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2004-2021 Edgewall Software # Copyright (C) 2004 Jonas Borgström <jonas@edgewall.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://trac.edgewall.com/license.html. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision # history and logs, available at https://trac.edgewall.org/. # # This script will enforce the following policy: # # "A checkin must reference an open ticket." # # This script should be invoked from the subversion pre-commit hook like this: # # REPOS="$1" # TXN="$2" # TRAC_ENV="/somewhere/trac/project/" # LOG=`/usr/bin/svnlook log -t "$TXN" "$REPOS"` # /usr/bin/python /some/path/trac-pre-commit-hook "$TRAC_ENV" "$LOG" || exit 1 # from __future__ import print_function import os import re import sys from trac.env import open_environment if 'PYTHON_EGG_CACHE' not in os.environ: os.environ['PYTHON_EGG_CACHE'] = os.path.join(sys.argv[1], '.egg-cache') def main(): if len(sys.argv) != 3: print("Usage: %s <trac_project> <log_message>" % sys.argv[0], file=sys.stderr) sys.exit(1) env_path = sys.argv[1] log = sys.argv[2] tickets = [] for tmp in re.findall('(?:close|closed|closes|fix|fixed|fixes|addresses|' 'references|refs|re|see)' '.?(#[0-9]+(?:(?:[, &]+| *and *)#[0-9]+)*)', log.lower()): tickets += re.findall('#([0-9]+)', tmp) # At least one ticket has to be mentioned in the log message if not tickets: print("At least one open ticket must be mentioned in the log " "message.", file=sys.stderr) sys.exit(1) env = open_environment(env_path, use_cache=True) count = None for count, in env.db_query(""" SELECT COUNT(id) FROM ticket WHERE status <> 'closed' AND id IN (%s) """ % ','.join(['%s']*len(tickets)), tickets): break if not count or count < 1: print("At least one open ticket must be mentioned in the log " "message.", file=sys.stderr) sys.exit(1) else: sys.exit(0) if __name__ == '__main__': main()
Close