在线DVCS客户端 [英] Online DVCS Client

查看:281
本文介绍了在线DVCS客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我一直在抓住各种解决方案来解决我的问题,例如建议的DVCS机制用于托管许多独立的修补程序在BitBucket上为许多用户和补丁使用Mercurial补丁队列库,但希望这将是我需要询问的有关如何为我描述的项目建立源代码管理的最后一个问题在 https://sourceforge.net/p/iotabuildit/wiki/Home/ 。然后,我可以接受一些关于其他问题的答案,然后继续。



我努力实现的要求是:


  1. 贡献源修改(补丁)对用户来说必须非常容易。这意味着他们不应该下载版本控制客户端。

  2. 任何版本的代码都需要在线轻松托管,因为它在Chrome中不起作用由于W3C的安全要求(IE明显忽略了这一点,但是Chrome的荣誉),文件也是如此。

  3. 用户应该能够自行注册并自动获得许可,以供其他人可以播放和评论(比如Little Big Planet,但更加集成 - 允许更改任何内容,而不仅仅是添加内容)。

远远没有出于以下原因:


  1. Mercurial Patch Queue - 在探索了一会儿之后,我发现它太复杂了,平均玩家/用户参与其中。我们正在讨论潜在的非开发人员。

  2. Github& BitBucket - 这些存储库似乎仍需要本地DVCS客户端,并需要额外的步骤来提供补丁。最终他们对普通用户来说仍然很难,尤其是那些只想玩某个用户特定版本的游戏的人。似乎无法在线托管文件。

现在我的建议解决方案如下所示,我想查看是否我错过了一些可以用其他方式更好地处理的东西。我将在我的SourceForge项目上创建一些PHP脚本,这些脚本将:


  1. 允许用户使用密码注册他们自己的电子邮件/帐户,他们可以更新自己的修补程序允许他们克隆标准存储库或任何其他用户存储库。

  2. 在线创建克隆 存放在PHP脚本可访问的目录中,而不是HTTP。

  3. 允许他们将一组文件提交到其工作目录,并将差异提交到其存储库中修补程序。

  4. 允许从同一目录中的其他用户存储库中获取修补程序。 (提交并提交到您自己的存储库不需要身份验证,当我考虑更正式的在线存储库托管时,这是一个绊脚石)

  5. 有一个单独的PHP脚本,可以复制将您的工作区放入托管目录,在该目录中可以在线播放游戏。任何玩家都可以访问这个工作区来玩你的游戏版本(可能包括从任何数量的其他存储库中提取的补丁)。

看起来很奇怪,我不能使用现有的存储库来做到这一点,但我想不出解决认证问题的办法。所以我需要创建我自己的克隆,我知道PHP脚本应该能够访问并承诺而不用推送。不幸的是,其他DVCS客户端可能无法从这些在线客户端获取数据,但如果需要的话,可能会有方法导出补丁程序。我不知道当合并冲突出现时我会怎么做。但是,这是迄今为止我接近可行的解决方案。



因此,我最终得到的是一个在线DVCS客户端,以避免用户不得不下载DVCS客户端,并避免为他们的游戏版本找到主机。我忽略了一个更简单的解决方案吗? (我违反了SourceForge的服务条款吗?如果(我可以得到)Mercurial安装在那里,我也可以在Dreamhost上托管它。)

p>几乎没有评论/答案:

使用DVCS('D'为分布式),不存在'服务器'或'客户端'。

如果你想在本地(在你的工作站上)访问代码,你将需要一个DVCS(git或者Mercurial),并且你可以克隆一个(即,存储在GitHub或BitBucket中的远程回购)。



下游和上游/ 2749166#2749166>上游回购据我所知,每个用户都会分叉主repo,为每个用户创建一个repo,仍然存储在上游服务器(GitHub或BitBucket)上,因为它是叉子背后的想法(远程端的克隆)。



这将解决1.因为每个用户都是他/她自己的分支的所有者,并且只有写权限。

2.是给定的您可以派生一个回购)

剩下的点将不会被GitHub或BitBucket解决,而是被一个专用的服务器,你安装了DVCS,你已经添加了相关的钩子来实现你想要的自动化。

这个专用的服务器可以监视GitHub或BitBucket上推送的内容,给定用户的给定仓库,执行所需的克隆或更新,并将repo同步到正确的目录(例如,在您的案例中可以访问PHP脚本)。


Okay, I have been grasping as all sorts of solutions to my problems with questions like Recommended DVCS mechanism for hosting many independent patches and Using Mercurial patch queue repository on BitBucket for many users and patches, but hopefully this will be the last question I need to ask about how to establish source control for my project described at https://sourceforge.net/p/iotabuildit/wiki/Home/. Then I can accept some answer on my other questions and move on.

The requirements I am struggling to fulfill are:

  1. Contributing source modifications (patches) must be very easy for the user. That means they should not have to download a version control client.
  2. Any version of the code needs to be easily hosted online because it doesn't work in Chrome when run from a local set of files due to W3C security requirements (which IE apparently ignores, but Chrome honors).
  3. Users should be able to register by themselves and automatically have permission to contribute patches that anyone else can play and review (like Little Big Planet, but more integrated - allowing changes to anything instead of just adding content).

The paths I have tried so far have failed for the following reasons:

  1. Mercurial Patch Queue - after exploring this for a short while, I discovered it's far too complicated for an average player/user to get involved in. We're talking potential non-developers here.
  2. Github & BitBucket - These repositories still appear to require a local DVCS client, and require additional steps to contribute patches. In the end they are still to difficult for an average user, especially someone who simply wants to play some user's particular version of the game. There appears to be no way to host the files online.

So now my proposed solution is as follows, and I want to see if I am missing something that could be better handled in some other way. I will create some PHP scripts on my SourceForge project that will:

  1. Allow users to register their own email/account with a password so that only they can update their own "patches"
  2. Allow them to clone the standard repository or any other users repository.
  3. Create the clone online in a directory accessible to the PHP script, but not to HTTP.
  4. Allow them to submit a set of files to their working directory and commit the differences to their repository as a patch.
  5. Allow patches to be pulled from other user's repositories in the same directory. (Pulling and committing to your own repository doesn't require authentication, which is a stumbling block when I was considering more formal online repository hosting that already exists)
  6. Have a separate PHP script that copies your workspace into a hosted directory where the game can be played online. Any players could visit this workspace to play your version of the game (which may include patches pulled from any number of other repositories).

It seems odd that I can't use existing repositories to do this, but I can't think of a way around the authentication problem. So I need to create my own clones that I know the PHP script should be able to access and commit to without pushing. Other DVCS clients will probably not be able to pull from these online clients, unfortunately, but there are probably ways to export patches if need be. And I don't know what I'm going to do when a merge conflict comes along. But this is the closest I've come to a workable solution so far.

So what I end up with is an online DVCS client to avoid the users having to download a DVCS client and avoid having to find a host for their version of the game. Am I overlooking a simpler solution? (Am I violating SourceForge's terms of service? I could host it on Dreamhost too if (I can get) Mercurial installed there.)

解决方案

Few comments/answers:

With a DVCS (with a 'D' as Distributed), there is no 'server' or 'client'.
If you want to access the code locally (on your workstation), you will need a DVCS (git or Mercurial), and you would clone an upstream repo (that is, a remote repo stored in GitHub or BitBucket).

For what I understand, each user would fork the main repo, creating one repo per user, still stored on the upstream server (GitHub or BitBucket), since it is the idea behind a fork (clone on the remote side).

That would address 1. since each user is the owner of his/her own fork, and have write access only there.
2. is a given (you can fork a repo)

The rest of the points won't be addressed by GitHub or BitBucket, but by a dedicated server, where you have a DVCS installed, and where you have added the relevant hook in order to automate what you want.
That dedicated server can monitor what is pushed on GitHub or BitBucket, for a given repo of a given user, do the required clone or update, and sync the repo to the right directories (accessible to the PHP script in your case, for instance).

这篇关于在线DVCS客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆