关于源代码控制礼仪的问题

发布于 2024-10-04 22:20:55 字数 220 浏览 0 评论 0原文

在Eclipse中使用svn时,我可以正常添加文件还是需要告诉SVN添加?如果是这样,怎么办?

另外,在处理项目时是否必须始终进行更新以从服务器获取最新代码?这样做的问题是,有时另一个团队成员可能会处理我正在处理的代码,并在每个里程碑处检查而不通知我(当任务不是基于配对时)。

最后,svn有沙箱功能吗?就像我的代码的本地存储库一样,它仍然是 WIP。如果是的话,在哪里?

谢谢

When using svn in Eclipse, can I add files normally or do I need to tell SVN about an add? If so, how?

Also, is it a must to always do an update to get the latest code from the server when working on a project? The problem with this is that sometimes another team member may work on the code I am working on and check in at every milestone without informing me (when the task is not pair-based, either).

Finally, is there a sandbox feature in svn? Like a local repository of my code which is still WIP. If so, where?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

后知后觉 2024-10-11 22:20:55

在Eclipse中使用svn时,可以添加
文件正常还是我需要告诉
关于SVN的添加?如果是这样,怎么办?

您仍然可以使用其他 SVN 客户端,例如命令行或其他客户端。只需确保在尝试提交之前在 Eclipse 中刷新项目即可。

此外,是否必须始终执行
更新以获取最新代码
从事项目时的服务器?这
问题是有时
另一位团队成员可能会从事该工作
我正在处理的代码并签入
每个里程碑都没有通知我
(当任务不是基于结对的时,
任一)。

这不是必须,但建议您在提交之前这样做。首先,因为如果您的更改与其他人提交的更改不同步,我会破坏项目。其次,如果您的更改修改了自上次更新以来已更改并提交的文件,svn 将使您在允许您提交之前对该文件进行更新。

最后,有沙盒功能吗?
svn?就像我的本地存储库一样
代码仍处于 WIP 状态。如果是的话,在哪里?

不,没有。有你的“工作副本”和“存储库”。这是svn分支的使用之一代码>.每个团队成员都可以有自己的分支,或者每个功能都可以有自己的分支以进行隔离开发。然后,开发人员可以按照他们认为合适的方式提交他们正在处理的分支,完成后有人可以将该分支合并回主干。

When using svn in Eclipse, can I add
files normally or do I need to tell
SVN about an add? If so, how?

You can still use another SVN client like the commandline or what have you. Just make sure you refresh your project in Eclipse before trying to commit.

Also, is it a must to always do an
update to get the latest code from the
server when working on a project? The
problem with this is that sometimes
another team member may work on the
code I am working on and check in at
every milestone without informing me
(when the task is not pair-based,
either).

Its not a must but It's adviseable to do so before you commit. Firstly because your changes my break the project if they arent in sync with the changes others have committed. Secondly, if your changes modify a file that has been changed and commited since the last time you did an update svn is going to make you do an update on that file before it allows you to commit anyway.

Finally, is there a sandbox feature in
svn? Like a local repository of my
code which is still WIP. If so, where?

No there isnt. There is your "Working Copy" and there is the "Repository". This is one of the use of branches in svn. Each team member could have their own branch, or each feature could have its own branch for isolated development. Developers can then commit to the branch they are working on as they see fit, and when they are done someone can merge that branch back to the trunk.

安静 2024-10-11 22:20:55

在团队环境中使用 SVN 时我通常遵循的步骤:

  • 将项目与存储库同步;这显示了对项目文件所做的所有更改,然后我可以通过双击文件在差异视图中检查这些更改
  • 如果所有更改都正常或不影响我,我会对头进行完整的更新
  • 如果我遇到冲突时,我确保所有这些冲突都得到解决。完成此操作后,执行步骤 2
  • 进行小更改、测试小更改并尽可能频繁提交。

最后,有沙盒功能吗?
svn?就像我的本地存储库一样
仍处于 WIP 状态的代码

据我所知,尽管 DVCS 有区分“提交”和“推送”的概念,这可能正是您正在寻找的。

The steps which I usually follow when using SVN in a team setting:

  • Synchronize the project with repository; this shows me all the changes made to the project files which I can then inspect in a diff sort of view by double-clicking the file
  • If all the changes are OK or don't affect me, I do a complete UPDATE TO HEAD
  • If I encounter a conflict, I make sure that all those conflicts are resolved. After this is done, perform step 2
  • Make small changes, test small changes and commit frequently as far as possible.

Finally, is there a sandbox feature in
svn? Like a local repository of my
code which is still WIP

Not that I know of though DVCS's have the concept of differentiating between "commit" and "push" which might be what you are looking for.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文