[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Can SVN pull request same as GIT?

From: Julian Foad <julianfoad_at_apache.org>
Date: Fri, 30 Nov 2018 09:56:28 +0000

钱海远(Nathan) wrote:
> We want to develop a feature like git pull request .
> But it is not easy to develop. Svn has only one server , how to store the patches?
> If build failed , how to revert working copy. How to resolve the conflict.
> Git is a better , it can support pre-commit code review, pull request by default. Is
> subversion able to develop these features in the future?.

Some other companies are also interested in developing the same.

There are a few different possible directions.

You could implement pull requests (PR) using Subversion's branches. The PR would be some kind of message that you send to your PR server, saying something like, "please merge branch $REPO_URL/branches/pull-requests/pr1234 to $REPO_URL/branches/my-branch". The PR server would check out the target branch in to a WC local to that server, attempt the merge, commit it, and delete the PR. If the merge fails, the PR server can "svn delete" the PR branch; there is no way to permanently delete the contents of that branch from history, but in many cases that can be OK. If there are conflicts, the PR server can send an error report back to the originating user.

If you really want the PR not to be committed to a branch, so that you can permanently delete it if it fails, then you need to store patches somehow. That is an area where Subversion is currently very weak. I am currently working on client-side shelving. Shelving provides a way to manage patches on the client side (in a working copy), better than standard diff/patch files. This was released in a simple form in v1.10, and improved in v1.11. Once this is working well on the client side, it should be possible to extend the idea towards the server side. Read more about it in the Wiki [1] and come and talk to us on dev@ about developing that further.

You said that you build a lot of tools for Subversion. It would be good if you can come to the Subversion development mailing list "dev@" [2] -- that is where we discuss and design and debug new feature developments. There we can share and help and learn from each other, and there is where you are likely to connect with other developers who want to do the same thing. When you are ready, if you can write a more detailed description of any of your plans, or share something that you have already developed, you could send it to dev@ and I will be interested to read it and help guide my development of the shelving and future directions, and I hope also that you will find someone else likes it too and wants to help you make it better.

[1] https://cwiki.apache.org/confluence/display/SVN/Shelving+and+Checkpointing
[2] see http://subversion.apache.org/mailing-lists.html for details.

- Julian
Received on 2018-11-30 10:56:38 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.