“tfpt online” with -diff… can it ignore the “Read Only” attribute?

随声附和 提交于 2020-01-03 02:49:08

问题


I figured that adding the -diff option meant that it ignored the "Read Only" flag. What it actually does is get the union of 2 sets of files 1) those files that have their "Read Only" flag unset AND 2) those files that have been modified ("Read Only" flag can remain set)

$ tfpt online "D:\a\b\c.txt" -diff -preview
Getting your pending changes from the server...
Checking the status of D:\a\b\c.txt... Done
Walking D:\a\b\c.txt... Found 1

Showing potential changes only. No changes made.
Edits:

 edit: D:\a\b\c.txt
Showing potential changes only. No changes made.

$ tf diff  "D:\a\b\c.txt"
Comparing local to latest: D:\a\b\c.txt

$

What I'd really like is for tfpt online to ignore the "Read Only" flag and ONLY list files that have actually been modified. Is this possible?


回答1:


Unfortunately, there's no way to simply exclude the list of files that are not read-only from being pended as edits. However, you can use the "undo unchanged" command of the power tool to undo those edits that were writable but did not have content differences:

tfpt online /diff [itemspec]
tfpt uu [itemspec]

tfpt uu will compare the hashes again to determine what's unchanged from the server, so it's obviously less efficient than if you were to ignore the read-only attribute the first time, but it should ultimately solve your problem.



来源:https://stackoverflow.com/questions/8449331/tfpt-online-with-diff-can-it-ignore-the-read-only-attribute

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!