Re: Can SVN pull request same as GIT?

2018-11-30 Thread Julian Foad
钱海远(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


Re: a issue of --include' and '--exclude' options on 'svnadmin dump'

2018-11-30 Thread Julian Foad
Johan Corveleyn wrote on 2018-10-16:
> On Tue, Oct 16, 2018 at 11:56 AM 钱海远(Nathan)  
> wrote:
>> During I am testing the -include' and '-exclude' options on 'svnadmin dump'  
>> ,  I found
>> that if I copy a non-include file, the  dump result is to add a file with 
>> file content;
>> But if the copy is a non-include directory, the dump only adds this 
>> directory.
>> I think, this may be wrong, it should be copy of the directory and all the 
>> files under the
>> directory .
> 
> https://issues.apache.org/jira/browse/SVN-4760 [...]
> 
> This does indeed look like a bug / shortcoming of the current "dump with 
> include/exclude".

Nobody responded so far. On the Subversion dev@ mailing list I have now 
forwarded this bug report to the original developer of the feature.

If anyone else is available to help with testing, debugging or fixing this, 
that would be wonderful. For example, the first thing needed is to extend the 
included tests to cover this case. Please come to "dev@" if you can help.

- Julian


Re: Can SVN pull request same as GIT?

2018-11-30 Thread Nico Kadel-Garcia
On Thu, Nov 29, 2018 at 10:31 PM 钱海远(Nathan) 
wrote:

> Dear Sir,
>
>
>
> 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?.
>
>
>
> We like subversion ,we build a lot tools for subversion, like the
> pre-commit code review、issue plugin、code count、svn multisite (same as
> Wandisco’s svn multisite plus) ,but it’s became hard and hard, is it time
> for us to give up svn?
>
>
>
 This seems infeasible. The working copy in which the merges would occur
does not exist in the Subversion workflow. It's a case where git-svn could
work well, as long as you avoid the boobytraps such as difficulties merging
metadata, such as "svn:keywords" or ".gitattributes" or features like
submodules.


Re: Can SVN pull request same as GIT?

2018-11-30 Thread Julian Foad
Nico Kadel-Garcia wrote:
> On Thu, Nov 29, 2018 at 10:31 PM 钱海远(Nathan)  
> wrote:
>> We want to develop a feature like git pull request .
>> [...]
> 
>  This seems infeasible. The working copy in which the merges would occur does 
> not exist in the Subversion workflow.

Hello Nico!  What do you mean? If Nathan is developing a Subversion pull 
request workflow, his software can create a WC when it needs one.

Hello Nathan.  I am having difficulty knowing what you really require. "Like 
git pull request" could mean lots of different things. It would help if you can 
describe exactly what you require.

- Julian


Re: Can SVN pull request same as GIT?

2018-11-30 Thread Nathan Hartman
On Fri, Nov 30, 2018 at 4:56 AM Julian Foad  wrote:

> 钱海远(Nathan) wrote:
> > We want to develop a feature like git pull request .
>
> 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.


It seems to me that the refactorings and support for shelving/checkpointing
being developed right now are putting into place a good foundation for
implementing pull request type functionality as well. I like that merges in
Subversion are always done in a working copy, not directly on the server.
This allows to apply a PR, test, make changes, etc. The workflow for a PR
as I see it is to produce something akin to a patch file which contains the
changes and other information needed to merge, e.g. the revision the PR is
based on. Furthermore I think there should be a place in this file for
"description" or log message so that users could easily identify what the
PR is. Also that could be copied into the log message for the commit. This
PR could be sent by email or through any other means such as a bug tracker
attachment. If a future non-versioned server-side storage is implemented
then that could be utilized. But bottom line I think this depends directly
on the same logic needed for checkpointing.


Re: Can SVN pull request same as GIT?

2018-11-30 Thread Nico Kadel-Garcia
On Fri, Nov 30, 2018 at 8:20 AM Julian Foad  wrote:
>
> Nico Kadel-Garcia wrote:
> > On Thu, Nov 29, 2018 at 10:31 PM 钱海远(Nathan)  
> > wrote:
> >> We want to develop a feature like git pull request .
> >> [...]
> >
> >  This seems infeasible. The working copy in which the merges would occur 
> > does not exist in the Subversion workflow.
>
> Hello Nico!  What do you mean? If Nathan is developing a Subversion pull 
> request workflow, his software can create a WC when it needs one.
>
> Hello Nathan.  I am having difficulty knowing what you really require. "Like 
> git pull request" could mean lots of different things. It would help if you 
> can describe exactly what you require.
>
> - Julian

git pull requests perform a merge in the local repository. What you'd
need to create for this is a local repository, not a working copy, and
the working repository becomes part of a distributed source control
system. Those already exist, so I'd discourage you from trying to
re-invent that wheel and bolt it onto Subversion.