Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346828
swh-svn
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
761 B
Subscribers
None
swh-svn
View Options
#!/usr/bin/env python3
# Use sample:
# swh-svn --remote-url file:///home/storage/svn/repos/asf \
# --revision 30000 --path swh-asf-30000
import
click
from
subvertpy
import
client
from
subvertpy.ra
import
Auth
,
get_username_provider
@click
.
command
()
@click
.
option
(
"--remote-url"
,
help
=
"Remote url to export."
)
@click
.
option
(
"--path"
,
default
=
"."
,
help
=
"path to checkout locally."
)
@click
.
option
(
"--revision"
,
type
=
click
.
INT
,
help
=
""
)
def
main
(
remote_url
,
path
,
revision
):
_auth
=
Auth
([
get_username_provider
()])
_client
=
client
.
Client
(
auth
=
_auth
)
print
(
"svn export --ignore-keywords
%s
@
%s
%s
"
%
(
remote_url
,
revision
,
path
))
_client
.
export
(
remote_url
,
to
=
path
,
rev
=
revision
,
ignore_keywords
=
True
)
if
__name__
==
"__main__"
:
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Jul 4, 4:30 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3357969
Attached To
rDLDSVN Subversion (SVN) loader
Event Timeline
Log In to Comment