How to delete pending changelist in perforce
来源:互联网 发布:韩顺平 linux视频教程 编辑:程序博客网 时间:2024/05/21 10:45
How to delete pending changelist in perforce
up vote24down votefavorite
10
I have a workspace in perforce in which i made some files mark for delete. Now i want to delete that workspace forcefully. But i dont have admin rights. What to do. Please suggest some method. Thanks
perforce
asked Sep 6 '12 at 8:34
Steve Mark
131113
add a comment |
8 Answers
activeoldestvotes
up vote28down vote
Run p4 opened
to see all your opened files and run p4 revert
to revert them.
Then run p4 changes -c your-client-name -s pending
to see all your pending changelists. Since in the first step you reverted all your open files, these changelists will all be empty. Run p4 change -d change-number
to delete each empty pending changelist.
Then you can run p4 client -d
to delete your client.
edited Sep 6 '12 at 20:11
Dennis
10.2k12547
answered Sep 6 '12 at 13:46
Bryan Pendleton
8,36921019
2
For reverting and deleting a pending changelist, I prefer this sequence: p4 changes -u joe
to list my pending changelists; p4 revert -c 12345 //...
to revert all files in my pending changelist 12345 (for example); p4 change -d 12345
to delete the now-empty changelist. HTH.– JeffroOct 19 '13 at 16:46
add a comment |
up vote22down vote
Why it's only 11 clicks in P4V, through an arbitrary sequence of menu items.
- Right click on the changelist
- Delete shelved files
- 'Yes'
- Right click on the changelist
- Remove all jobs
- Right click on the changelist
- Revert files
- 'Revert'
- Right click on the changelist
- Delete pending changelist
- 'Yes'
Let's send Perforce to usability school.
edited Jun 20 '13 at 9:35
answered Feb 14 '13 at 10:01
Colonel Panic
27.3k15118179
add a comment |
up vote5down vote
Here is what I did to empty my default change set, which had a lot of files checked out for edit:
p4 opened | sed 's/#.*$//g' | xargs -iF p4 revert F
This will cut off the comment part from the filename produced by p4 opened
and pipe the filename to p4 revert
. After that I had nothing pending and p4 changes -c my-client-name -s pending
yields nothing. If you have a huge change set this will take a while.
answered Apr 4 '13 at 13:15
Juve
3,32042746
Love this.. Thanks Man!– Atif Mohammed AmeenuddinFeb 11 at 7:49
No need for xargs
here (and especially no need for the -i
option, which is unportable and deprecated even on Linux). Use p4 -x -
instead (see p4 help usage
). Also, to avoid the wait when you have a huge change set, use the -k
option to p4 revert
.– Gareth ReesMar 31 at 12:41
add a comment |
up vote2down vote
Here's a scriptable procedure for deleting a Perforce client. Use with care: this deletes all your work in progress on the client!
Revert all changed files on this client.
p4 -c $CLIENT revert -k //...
Note the use of the
-k
option, which "marks the file as reverted in server metadata without altering files in the client workspace". Since we are going to delete the client later, we don't care about updating the client workspace. This speeds things up if you have many files open.Delete all shelved files from pending changes associated with the client.
p4 changes -s shelved -c $CLIENT | cut -d' ' -f2 |while read CHANGE; do p4 shelve -c $CHANGE -d //...; done
If you never use
p4 shelve
you can omit this step.All pending changes associated with the client are now empty. Delete them.
p4 changes -s pending -c $CLIENT | cut -d' ' -f2 | p4 -b 1 -x - change -d
There are now no pending changes associated with the client. Delete the client.
p4 client -d $CLIENT
(This process ought to be much easier! In particular, there seems no good reason why we have to delete shelved files associated with a client before deleting the client. If you find yourself struggling with this, do contact Perforce support and suggest that it be made simpler.)
edited Sep 4 at 20:16
answered Mar 31 at 10:59
Gareth Rees
32.9k356102
I had shelved changes on another host (after switching computers). To be able to do step 2, I had to change the host of the workspace to my current one.– tunerJul 22 at 16:05
The help suggests that you can use the -f
option to force the deletion despite the mismatch. (You'll need "admin" permission though.)– Gareth ReesJul 22 at 16:54
The question was explicitly telling that no admin rights are available. I guess that is the case for most people who do professional work (=being paid for) with perforce.– tunerJul 23 at 8:08
Awesome! Step 3 didn't work for me. Was getting "Usage: change -d [ -f ] [ -O ] changelist# Missing/wrong number of arguments." Slight modification worked (Mavericks): p4 changes -s pending -c $CLIENT | cut -d' ' -f2 | xargs -n 1 p4 change -d– MoosSep 4 at 19:55
@Moos: Thanks for spotting my mistake! As an alternative to xargs
, you can use -b 1
to batch the arguments to p4
.– Gareth ReesSep 4 at 20:17
add a comment |
up vote1down vote
Wrote this script called p4-delete-client for deleting p4 changelists.
Note that it relies on other scripts in the repo.
edited Aug 12 at 9:04
answered Aug 4 at 6:48
Arnon Zilca
886215
add a comment |
up vote0down vote
try those steps :
1.Right click on the changelist
Choose 'Change Ownership'
In the workspace box choose already existing workspace and click OK
- right click on changelist and choose delete and than ok.
answered Aug 25 at 11:30
aristotaly
132111
add a comment |
up vote0down vote
try those steps (P4V) :
1.Right click on the changelist
Choose 'Change Ownership'
In the workspace box choose already existing workspace and click OK
right click on changelist and choose delete and than ok.
answered Aug 25 at 11:32
aristotaly
132111
add a comment |
up vote0down vote
This just worked for me in P4V for resetting the default changelist:
Right click on the default changelist and choose "Edit Pending Changelist 'default'"
Click the button on the bottom right "Save as numbered changelist"
Right click on the new changelist and choose "Delete changelist XXX"
You can also right click on the new changelist to revert the files for whatever you need to do, which is not available as an option on the default changelist.
answered Aug 28 at 3:35
John Starr Dewar
7611011
http://stackoverflow.com/questions/12296080/how-to-delete-pending-changelist-in-perforce/14872182
- How to delete pending changelist in perforce
- How To Delete Directory In Java
- How to undo pending changes by others
- perforce 获取本地最近更新的Changelist
- How to Confirm a Delete in an ASP.NET Datagrid...
- how to delete "permission from trustedinstaller" folder in Win7/Vista
- How to Delete Process Chain Logs in SAP BW?
- How to delete duplicate rows without children in sql server
- How to Delete a Business Partner in SAP CRM
- How To Remove Or Delete PPA In Ubuntu
- android:How to delete a module in Android Studio?
- How to delete the remote branch in git
- How To Delete BOM...?
- tools - p4v How do I display a particular changelist number in p4v?
- [PYTHON] 将perforce的 changelist放到 sqlite 数据库里面
- Perforce如何知道当前workspace包含的最新changelist
- How to Delete From or Add Resource to OCR in Oracle Clusterware (文档 ID 1069369.1)
- How to implement check box in listView Android to delete listItems
- 字符编码知识
- adb安装应用失败,错误码
- 黑马程序员 Java基础之 集合框架(collection)
- SQLServer2008R2下载地址
- MFC去掉ESC和回车键退出的方法
- How to delete pending changelist in perforce
- HDU_4734 F(x)[数位dp]
- 机器学习经典算法详解及Python实现--基于SMO的SVM分类器
- 承接活动上淘宝活动淘金币活动http://www.slscp.com承接活动上淘宝活动淘金币活动http://www.slscp.com
- 第六章 图
- 第 12周项目 3.4 递归 返回
- 第14周上机实践项目5——体会棋盘游戏中的数据存储(3)
- V4L2
- iOS设计指南(非官方)