File: ra_log.py

package info (click to toggle)
subvertpy 0.11.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 904 kB
  • sloc: ansic: 9,170; python: 6,395; makefile: 59; sh: 10
file content (20 lines) | stat: -rwxr-xr-x 653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
# Demonstrates how to iterate over the log of a Subversion repository.

from subvertpy.ra import RemoteAccess

conn = RemoteAccess("svn://svn.samba.org/subvertpy/trunk")

for changed_paths, rev, revprops, has_children in conn.iter_log(
    paths=None, start=0, end=conn.get_latest_revnum(), discover_changed_paths=True
):
    print("=" * 79)
    print("%d:" % rev)
    print("Revision properties:")
    for entry in revprops.items():
        print("  %s: %s" % entry)
    print("")

    print("Changed paths")
    for path, (action, from_path, from_rev, node_kind) in changed_paths.items():
        print("  %s (%s)" % (path, action))