2

(私はperforceプラグインによってEclipseからperforceを使用しています)。

ワークスペースを perforce デポに関連付けた後、すべてのファイルのステータスが「ワークスペース内のバージョンは最新バージョンではありません」(黄色の三角形) になりました。

ファイルがこのステータスの場合、このファイルの送信は無効です。

プロジェクトで「同期とデポ」を実行すると、それらのすべてのファイルに競合アイコンが表示されます (競合がない場合でも...)。

対立?解決する必要があるということですか?

解決方法は次のとおりです: http://www.perforce.com/perforce/doc.current/manuals/p4guide/05_resolve.html

問題は...「解決」することにより、perforceがワークスペース内のすべてのファイルをデポ内のファイルで上書きします。そのため、ワークスペースを perforce に関連付ける前にワークスペースに加えたすべての変更はなくなりました。

私が実際に達成したいのは、逆の方法です: ワークスペース内のすべてのファイルをデポに送信します。つまり、デポをオーバーライドします。

どうやってやるの?

4

3 に答える 3

1

「ワークスペースのバージョンが最新バージョンではない」という理由でPERFORCEが送信できないと言った場合、これは、他の誰かによってすでに変更および送信されたファイルを編集用に開いていることを意味します。つまり、古いバージョンで作業しています。ファイル。デポ内の新しいバージョンの上に(古い)バージョンを強制しようとしないでください。あなたは本当に解決する必要があります。PERFORCEは、ワークスペースのすべてのファイルを「上書き」して変更を破棄することはありません。

マージ(解決)には、eclipseの組み込みマージツールまたはp4merge(Perforceから)を使用できます。

于 2013-03-18T12:57:35.403 に答える
1

As other answers say, most of the time your best bet is to work with Perforce's workflow and check out the workspace in advance and make your changes there, rather than make changes first and create the workspace later. Sometimes, though, you really do need to break Perforce's workflow and override the changes in the depot. If you're going to do that, you need to be extra careful that you're not reverting something important. (Even on a one-person project you might have forgotten you checked something in, so look carefully at the diffs before submitting.)

The easiest thing to do is, when Perforce tells you that you have a conflict, resolve but keep your changes. In the Perforce documentation link, that's 'resolve, accept yours' rather than accepting what Perforce thinks is the sensible merge. From the command line, that's p4 resolve -ay. It's worded a little differently in the p4v GUI, and may be worded differently still in the Eclipse plugin (which I haven't actually worked with).

The other option, which you might use if you have files checked out from an earlier revision, and you want to update to the tip revision without making any changes, is to tell Perforce to update the metadata, so that it thinks you have a newer version of the file, without actually altering any of your files. From the command line, that's p4 sync -k (whatever you want to sync). This, too, can be dangerous if used inappropriately.

于 2013-03-18T16:03:09.320 に答える
0

PERFORCEで望むことを達成できるとは思いません。変更したファイルを安全な場所にコピーしてから、すべてのファイルを解決/元に戻して、競合/期限切れのフラグを削除する必要があります。完了したら、変更をコピーして送信します。面倒ですが、変更を加える前にPERFORCEに接続しておく必要があります。

于 2013-03-18T13:05:07.583 に答える