Mercurial > p > roundup > code
comparison doc/upgrading.txt @ 5332:d0689aaa83db
Applied patch 0038 from issue2550960 to upgrade code examples in
documentation to be compatible with both python 2 and 3. Patch
supplied by Joseph Myers.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 12 Jun 2018 20:27:04 -0400 |
| parents | ba1ce44254df |
| children | dd242cd7a182 392f887652f0 |
comparison
equal
deleted
inserted
replaced
| 5331:57caeefb2f81 | 5332:d0689aaa83db |
|---|---|
| 870 continue | 870 continue |
| 871 for op, p in j[4]['files']: | 871 for op, p in j[4]['files']: |
| 872 if op == '-': | 872 if op == '-': |
| 873 affected [i] = 1 | 873 affected [i] = 1 |
| 874 break | 874 break |
| 875 print ', '.join(sorted(affected.iterkeys())) | 875 print(', '.join(sorted(affected.keys()))) |
| 876 | 876 |
| 877 To find out which files where attached before you can look in the | 877 To find out which files where attached before you can look in the |
| 878 history of the affected issue. For fixing issues you can re-attach the | 878 history of the affected issue. For fixing issues you can re-attach the |
| 879 files in question using the "set" command of roundup-admin, e.g., if the | 879 files in question using the "set" command of roundup-admin, e.g., if the |
| 880 list of files attached to an issue should be files 5, 17, 23 for issue42 | 880 list of files attached to an issue should be files 5, 17, 23 for issue42 |
| 921 search permissions with the following script, run it in your tracker | 921 search permissions with the following script, run it in your tracker |
| 922 directory, it will list for each Class and Property the roles that may | 922 directory, it will list for each Class and Property the roles that may |
| 923 search for this property:: | 923 search for this property:: |
| 924 | 924 |
| 925 #!/usr/bin/python | 925 #!/usr/bin/python |
| 926 from __future__ import print_function | |
| 926 import os | 927 import os |
| 927 from roundup import instance | 928 from roundup import instance |
| 928 | 929 |
| 929 tracker = instance.open(os.getcwd ()) | 930 tracker = instance.open(os.getcwd ()) |
| 930 db = tracker.open('admin') | 931 db = tracker.open('admin') |
| 931 | 932 |
| 932 for cl in sorted(db.getclasses()): | 933 for cl in sorted(db.getclasses()): |
| 933 print "Class:", cl | 934 print("Class:", cl) |
| 934 for p in sorted(db.getclass(cl).getprops(protected=True).keys()): | 935 for p in sorted(db.getclass(cl).getprops(protected=True).keys()): |
| 935 print " Property:", p | 936 print(" Property:", p) |
| 936 roles = [] | 937 roles = [] |
| 937 for role in sorted(db.security.role.iterkeys()): | 938 for role in sorted(db.security.role.keys()): |
| 938 if db.security.roleHasSearchPermission(cl,p,role): | 939 if db.security.roleHasSearchPermission(cl,p,role): |
| 939 roles.append(role) | 940 roles.append(role) |
| 940 print " roles may search:", ', '.join(roles) | 941 print(" roles may search:", ', '.join(roles)) |
| 941 | 942 |
| 942 | 943 |
| 943 Migrating from 1.4.x to 1.4.12 | 944 Migrating from 1.4.x to 1.4.12 |
| 944 ============================== | 945 ============================== |
| 945 | 946 |
