Reputation: 127
If I like those changes I want to put them into my local repository.
Which ways can I go, to satisfy these requirements?
Will the SVN history of the open source project stay availible inside my repository whith those ways?
Thanks in advance.
Upvotes: 4
Views: 7889
Reputation: 97285
As it was suggested by gbjbaanb, you have to use Vendor Branches and stay it pure Subversion
You can (have to) add to described in book workflow one small detail:
you can link part of upstream repo (/trunk ???) into vendor's branch of your repo (using svn:externals). This way you can
svn up
, svn log
)Upvotes: 2
Reputation: 2982
Have a look at this StackOverflow Topic and answer: Correct workflow for managing a private Subversion fork. I have a very similar problem to yours and I am going to proceed using the git-svn [bridge aluded to in the accepted answer]. See also Git and Other Systems - Git and Subversion
Main Approach Advantage: This way you can always use SVN as the "back end", final repository.
I hope this helps. Love and peace,
Upvotes: 1
Reputation: 26607
I don't think there is a way of achieving that only with SVN. What you want is some sort of decentralized version control system, like Git or Mercurial.
I don't know if you've already work with one of them, but you can achieve what you want with both.
Here's some step to my idea (from a Mercurial point of view, but this will be quite identical with Git) :
hg init
in an empty directory)hg addremove
)hg commit -m "initial commit"
)hg clone /path/to/myrepo .
in an empty directory)You can now work in this mercurial clone and commit in it. However it's really important to never push the changes in the original mercurial repository.
For updating the SVN repository, follow these steps :
svn update
hg addremove; hg commit -m "svn update"
hg pull; hg merge; hg commit -m "merging svn update"
For this to work, the working directory must be clean, ie all the changes must have been committed.
Basically, what we're a doing is using Mercurial as some sort of proxy to the SVN repository. You can commit to the local Mercurial clone without ever modifying the original source and still update from SVN and then merge theses changes in the local Mercurial clone.
I don't exactly know how to reproduce theses steps with Git, but I know it's also possible. You can even any other dvcs if you know one of them.
I totally agree that this solution is a bit complicated, but I never found an easier way to achieve this. I worked like this for 9 month with a CVS repository as a source and never had a problem.
However, if you've never heard of dvcs, git or mercurial, I strongly advised that you read some documentation, because theses steps are pretty complicated and things can go wrong pretty fast.
Hope this help.
EDIT:
You can also use SVN externals, but you won't be able to review and choose the modifications you want to import in your repository.
You will have to set a svn:externals property on a directory with :
svn propedit externals adirectory
Which will open an editor to let you edit the externals for the adirectory
directory. Here you add a line for each external repository you wand to checkout in this directory like this (for each line) :
path/where/tocheckout http://svn.example.com/repos/project
The next time you'll do an update, the svn repository will be checkouted in the given directory, with the full history.
(it's a long time since I used svn:externals, maybe some of the explanation is wrong, but it'll probably enough to get the big picture)
Upvotes: 0