Как удалить неотслеженные файлы из По необходимости рабочего дерева?

Удостоверьтесь, что Wubi и изображение .iso - все на жестком диске Вашего компьютера. Если это будет на внешнем диске или устройстве хранения данных, то это, возможно, предложит Вам ошибки. Во-вторых, если Вы установили Wubi ранее, я предлагаю удалить его и удалить файлы, связанные с Wubi, как я сказал, переместите Wubi и изображение .iso к жесткому диску компьютера (мои документы, рабочий стол, безотносительно) и выполните его оттуда. Если это не помогает Вам, я соглашаюсь с @mahboobeAlam..., просто следуют инструкциям на ubuntu.com того, как сделать живой CD или живой usb, BIOS редактирования для запуска с usb/cd и следовать инструкциям. Можно сделать раздел прежде, чем установить человечность, но я рекомендовал бы не сделать это и сделать тот раздел при установке Ubuntu. Это легко, и это делает грязную работу для Вас.Удачи!

28
задан Colonel Panic 19 July 2016 в 09:03
поделиться

2 ответа

Попробуйте (для Unix) со своего верхнего уровня:

# Find all files and filter for those that are unknown by Perforce
find . -type f | p4 -x - fstat 2>&1 > /dev/null | sed 's/ -.*$//' > /tmp/list
### manually check /tmp/list for files you didn't mean to delete
# Go ahead and remove the unwanted files.
xargs rm < /tmp/list

Или, для чистого подхода -f, просто перенаправьте напрямую в xargs rm вместо того, чтобы сначала помещать список файлов в / tmp /list.

11
ответ дан 28 November 2019 в 03:13
поделиться

There is no equivalent. Perforce has no command to remove files that are not under its control. You can see them in P4V, on the Workspace tab (they have plain white icons rather than the lined icons with the green dot) and delete them manually. If you want to automate the process, the easiest thing to do would be to remove the files from your workspace, delete everything in the directory, then sync it back up. A batch file to do it would look something like this:

p4 sync "//depot/someFolder/...#0"
erase C:\projects\someFolder\*.* /s /q /f
rd C:\projects\someFolder /s  /q
p4 sync -f "//depot/someFolder/..."

The first line is optional if you use the force switches on the erase and sync commands.


That solution has its drawbacks however. If you're currently working on any of the files, you obviously don't want to wipe them out. Also, a full sync can take quite a while if there is a huge amount of data in the directory tree you wish to clean.

A better way to do it would be to have your clean utility (I think we've grown beyond a batch file at this point) grab the list of files under version control using the p4 files command. Then iterate through all the files in the directory, deleting those that don't appear on the list.

4
ответ дан 28 November 2019 в 03:13
поделиться
Другие вопросы по тегам:

Похожие вопросы: