我编辑了一个文件,然后使用搁置的更改列表X
搁置了其中的更改。现在,我编辑另一个文件。如何将该文件添加到已存在的已搁置的更改列表X
中,或生成一个包含两个文件中的更改的新更改列表?
谢谢。
最佳答案
您不必像@Dennis建议的那样unshelve
,尽管这可能是这样做的一种方法。
对于要添加到现有文件架的未打开文件,只需将该文件打开到现有书架的更改列表中即可。例如,如果您的货架由更改列表#1729标识,则执行
p4 edit -c 1729 forgot_to_shelve.py
然后,搁置它:
p4 shelve -c 1729
如果事实证明文件已存在于文件架中,但您希望对其进行更新,则照常添加
-f
:p4 shelve -c 1729 -f
对于要添加到现有文件架中的当前打开的文件,,首先将文件
reopen
放入现有文件架的更改列表中,然后按上述方式进行搁置:p4 reopen -c 1729 forgot_to_shelve_and_currently_opened.py
p4 shelve -c 1729
引用:
In order to add a file to a pre-existing shelve, the file must first be opened in the shelve's changelist; use
p4 reopen
to move an opened file from one changelist to another.
p4 shelve // Perforce 2013.3: Command Reference
关于version-control - 如何在Perforce的搁置更改列表中添加文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12209947/