forked from dsoprea/PySvn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
executable file
·103 lines (73 loc) · 2.23 KB
/
test.py
File metadata and controls
executable file
·103 lines (73 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env python2.7
import sys
import os.path
dev_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0, dev_path)
import logging
_logger = logging.getLogger()
_logger.setLevel(logging.DEBUG)
logging.getLogger('boto').setLevel(logging.INFO)
ch = logging.StreamHandler()
FMT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
formatter = logging.Formatter(FMT)
ch.setFormatter(formatter)
_logger.addHandler(ch)
print("Printing log.")
import pprint
import svn.local
l = svn.local.LocalClient('/tmp/test_repo.co')
for rel_path, e in l.list_recursive():
print('')
print('[' + rel_path + ']')
print('')
pprint.pprint(e)
#LogEntry(date=datetime.datetime(2015, 4, 24, 3, 2, 39, 895975, tzinfo=tzutc()), msg='Added second file.', revision=2, author='dustin')
#LogEntry(date=datetime.datetime(2015, 4, 24, 2, 54, 2, 136170, tzinfo=tzutc()), msg='Initial commit.', revision=1, author='dustin')
sys.exit(0)
import svn.local
import svn.remote
import pprint
#r = svn.remote.RemoteClient('https://xyz/svn/adam2/trunk')
#r = svn.local.LocalClient('/Users/dustin/development/php/adam2')
import svn.local
import pprint
l = svn.local.LocalClient('/tmp/test_repo.co')
info = l.info()
pprint.pprint(info)
properties = l.properties()
pprint.pprint(properties)
sys.exit(0)
# print(list(r.list(extended=True)))
l = r.list_recursive(rel_path=None, yield_dirs=False, path_filter_cb=None)
l = list(l)
pprint.pprint(l)
# print(r.cat('sfs/package/DEBIAN/postinst'))
#import dateutil.parser
#import datetime
#
#from_ = datetime.datetime.now().replace(day=21)
# for e in r.log_default(timestamp_from_dt=from_):
# print(e)
#
# sys.exit(0)
#i = r.info()
# print(i)
sys.exit(0)
print(i.attrib['kind'])
print(i.attrib['path'])
print(i.attrib['revision'])
print(i.find('url').text)
print(i.find('relative-url').text)
repo = i.find('repository')
print(repo.find('root').text)
print(repo.find('uuid').text)
commit = i.find('commit')
print(commit.find('author').text)
print(commit.find('date').text)
# print(r.info().items())
# print(r.info().getchildren())
#import pprint
# pprint.pprint(r.info())
# r.checkout('/tmp/checkout_2')
# r.export('/tmp/export_1')
#l = svn.local.LocalClient('/Users/dustin/development/php/adam2')