Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
= svn-transform
SvnTransform allows you to recreate a Subversion repository, and make some changes to it in the process. It is particularly designed to allow altering the content, properties or name of files; changes at the directory level are possible but more likely to cause errors.
The library seems to be working for my purposes, but the more moves, deletes, copies, etc involved, the more likely this is to just miss something. In other words, don't just throw out the old repository; you may need it.
== Use cases
Some reasons you might want to use SvnTransform:
== Usage
The simplest case is a copy without any transformations:
require 'svn-transform'
transform = SvnTransform.new('svn://example.com/existing_repo', 'my_copy')
transform.convert
SvnTransform includes a method for comparing two repositories on the local filesystem (it just runs a recursive diff with some options):
SvnTransform.compare('/path/to/existing', '/path/to/new')
I recommend (where reasonable) before you run a real transform, run a direct copy, followed by .compare, as it might alert you that there's something about the particular repository that SvnTransform may not handle well. There's a few things to be aware of here:
A basic copy can be useful, but the key element of SvnTransform is the ability to make (some) changes throughout the entire history. A transform can be either be a class or a block. Each file (or directory), at each revision where it is modified in some way, is given as an SvnTransform::File (or SvnTransform::Dir) to each transform, which can alter the basename, body and/or properties of the file prior to its being committed to the new Repository.
See SvnTransform::File or SvnTransform::Dir for the methods available, which include various metadata about the node/revision and the ability to make changes prior to the commit.
Use either SvnTransform#file_transform or #dir_transform to add the transform (they are processed in order added).
Several Transform classes are included (see classes in the SvnTransform::Transform module). Below is an example using the Transform::Extension class and a block.
transform = SvnTransform.new('file:///svn/myrepo', 'transformed_repo')
transform.file_transform(SvnTransform::Transform::Extension, {:md => :markdown})
transform.file_transform do |file|
# Add leading newline to files name "newline.rb"
if 'newline.rb' == file.basename
file.body = "\n" + file.body
end
end
transform.convert
== Installation
Gem is hosted on gemcutter (http://gemcutter.org)
gem install svn-transform
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 Jared E. Morgan. See LICENSE for details.
FAQs
Unknown package
We found that svn-transform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.