在 Perforce 上提交 Eclipse 项目

发布于 2024-12-27 20:03:12 字数 463 浏览 0 评论 0原文

我有一个菜鸟 Perforce 问题。我让我的 perforce 插件在 Eclipse 上工作(适用于 Java 和 C)。

我在 Eclipse 上“打开”我的 perforce 存储项目没有任何问题。

场景一: 每当我想要更改代码时,我都会在 Eclipse 上打开项目并右键单击它并转到“团队”并签出、进行更改然后提交。工作正常。但即使在那之后,我在我的 perforce 屏幕上看到了一个勾号(表示结账)。

场景2: 我只是将 perforce 代码作为 Eclipse 项目打开并进行更改(如果只读,它会提示并询问我是否必须允许写入,我说是)。我进行更改并保存。它不要求提交。另外,如果我现在在 Perforce 屏幕上打开代码,我已经看到了所做的新更改。

场景3: 就在 Perforce 屏幕上,如果我签出文件并且不进行任何更改,我显然不想提交,因为没有更改。在这种情况下,我如何“禁用”签出,以便我的程序员同事不认为我正在处理它?

I have a noob Perforce question. I got my perforce plug-in on Eclipse working(for both Java and C).

I have no problems "opening" my perforce stored projects on Eclipse.

Scenario 1:
Whenever I want to change code, I open the project on Eclipse and right-click on it and go to "team" and check out, make changes and then submit. Works fine. But even after that I see a tick mark(indicating check-out) on my perforce screen.

Scenario 2:
I just open perforce code as Eclipse project and make changes(If read only, it prompts and asks if i have to allow write and I say yes). I make changes and save. It doesnt ask for submit. Also if I now open the code on Perforce screen, I already see the new changes made.

Scenario 3:
Just on a Perforce screen, if I check a file out and don't make any changes, I obviously dont want to submit as there are no changes. In this case, how can i "disable" check-out so that my fellow programmers dont think i'm working on it??

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

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

发布评论

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

评论(3

迷荒 2025-01-03 20:03:12

场景3:

所以我认为有两种方法可以很好地使用该插件:

  1. 使用恢复未更改的文件:
    在开始开发功能之前,请检查将来您的更改将集中的整个树/分支。您可以通过右键单击包资源管理器中的相关包来执行此操作。一旦你想提交,项目->右键->团队->恢复未更改的文件。现在,您可以提交更改列表。
    如果您知道将编辑大量文件或替换文件,则此方法非常有用。
    当然,其他人可以看到您已签出文件。

  2. 启用自动结账:
    如果您打算进行一些更改,则应该启用自动结账。当您开始编辑时,这将检出该文件。 Eclipse->首选项->团队->Perforce->启用工作台编辑支持。
    此处有详细说明。最好在按需检查时始终启用此功能。
    但是,这不会监视文件系统,因此您在 Eclipse 外部替换的代码/库不会被签出。

Scenario3:

So here are 2 ways i consider a good usage of the plugin:

  1. Use Revert Unchanged Files:
    Before you begin development of a feature, checkout the entire tree/branch that your changes will be concentrated around in future. You can do this by right-click the relevant package in package explorer. Once you want to submit, Project->Right-click->Team->Revert Unchanged Files. Now, you can submit your changelist.
    This approach stands very useful if you know you will be editing a lot of files or replacing files.
    Ofcourse, others can see that you have checked out the files.

  2. Enable Auto checkout:
    Incase you are going to make few changes, you should enable autocheckout. This will checkout the file when you begin to make edits. Eclipse->Preferences->Team->Perforce->Enable support for workbench edit..
    detailed explainations here. Its a good idea to have this enabled always as it checks out on demand.
    However, this does not monitor the filesystem so and code/libs you replace outside of eclipse are not checked out.

葬花如无物 2025-01-03 20:03:12

对于场景 3,您可以更改工作区选项以防止提交未更改的文件:

SubmitOptions:  reverttunchanged

如果您签出文件(打开以进行编辑),其他人将能够看到该文件。我想我不清楚如果您不打算修改文件,为什么要签出它?

For Scenario 3, you can change a workspace option to prevent submitting unchanged files:

SubmitOptions:  reverttunchanged

If you have a file checked out (open for edit), others will be able to see that. I guess I'm not clear on why you check a file out if you don't intend to modify it?

著墨染雨君画夕 2025-01-03 20:03:12

如果您要以这种方式进行设置并且还使用桌面客户​​端,我建议在桌面客户端中执行以下步骤:

1.) 打开桌面 Perforce 客户端

2.) 单击全局菜单上的“连接”

3.) 选择“编辑当前工作空间...”

4.) 在“高级”选项卡下选择“allwrite”

5.) 单击“应用”,然后单击“确定”

If you are going to setup this way and are also using the desktop client, I recommend the following steps in the desktop client:

1.) Open your desktop Perforce client

2.) Click “Connection” on the global menu

3.) Select “Edit Current Workspace…”

4.) Under the “Advanced” tab select “allwrite”

5.) Click Apply, then OK

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