Jump to content


quick way to delete a stream along with all associated clients and pending changelists

streams stream workspaces workspaces delete p4v p4

  • Please log in to reply
5 replies to this topic

#1 umair

umair

    Member

  • Members
  • PipPip
  • 19 posts

Posted 05 January 2016 - 11:57 AM

Hi. I am using p4v.
I have a lot of streams which I want to delete.
The problem is that I have to delete every associated workspace manually along with its pending changelists.

Is there a faster way to get rid of a stream along with all associated workspaces (with pending CLs)??

If this is not possible in p4v.

What would be the way to accomplish this with p4 (in linux).

Thanks.

#2 Mailman Sync

Mailman Sync

    Advanced Member

  • Maillist Aggregator
  • 2495 posts

Posted 05 January 2016 - 12:50 PM

Originally posted to the perforce-user mailing list by: Michael Mirman


We had to write a script to do this.
We have to go over all the clients running "p4 client -df" for each.
However, this does not remove shelves (and we never want to leave shelves without a client).
So,
For each stream you want to delete
{
For each client associated with this stream
{
For each shelf for this client {
p4 shelve -d -c nnnn
}
p4 -c clientname revert -k //clientname/...
for each pending change in this client {
p4 change -d nnnn
}
p4 client -d clientname
}
p4 stream -d streamname
}

If you are an admin, you can use the -f option, but it does not help much.
If you don’t own any of this stuff (say, someone else created a client and/or opened files in a client), then you do need to use -f. If you are not an admin in that case, you just can't do all of this.

Seemingly simple thing turns out not to be so simple...

--
Michael Mirman
MathWorks, Inc.
508-647-7555


-----Original Message-----
From: perforce-user [mailto:perforce-user-bounces@perforce.com] On Behalf Of umair
Sent: Tuesday, January 5, 2016 7:00 AM
To: perforce-user@perforce.com
Subject: [p4] quick way to delete a stream along with all associated clients and pending changelists

Posted on behalf of forum user 'umair'.

Hi. I am using p4v.
I have a lot of streams which I want to delete.
The problem is that I have to delete every associated workspace manually along
with its pending changelists.

Is there a faster way to get rid of a stream along with all associated
workspaces (with pending CLs)??

If this is not possible in p4v.

What would be the way to accomplish this with p4 (in linux).

Thanks.



--
Please click here to see the post in its original format:
  http://forums.perfor...ing-changelists
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user


#3 Mailman Sync

Mailman Sync

    Advanced Member

  • Maillist Aggregator
  • 2495 posts

Posted 05 January 2016 - 03:00 PM

Originally posted to the perforce-user mailing list by: Michael Mirman


Oh, sorry, I forgot one more detail:
In order to delete a change, if the change is associated with any jobs, you have to disassociate it first:
for each pending change in this client {
for each job from the change {
p4 fix -d -c cccc jjjj
}
p4 change -d cccc
}

--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555


Quote

-----Original Message-----
From: perforce-user [mailto:perforce-user-bounces@perforce.com] On
Behalf Of Michael Mirman
Sent: Tuesday, January 05, 2016 7:48 AM
To: perforce-user@perforce.com
Subject: Re: [p4] quick way to delete a stream along with all associated clients
and pending changelists

We had to write a script to do this.
We have to go over all the clients running "p4 client -df" for each.
However, this does not remove shelves (and we never want to leave shelves
without a client).
So,
For each stream you want to delete
{
For each client associated with this stream
{
For each shelf for this client {
p4 shelve -d -c nnnn
}
p4 -c clientname revert -k //clientname/...
for each pending change in this client {
p4 change -d nnnn
}
p4 client -d clientname
}
p4 stream -d streamname
}

If you are an admin, you can use the -f option, but it does not help much.
If you don’t own any of this stuff (say, someone else created a client and/or
opened files in a client), then you do need to use -f. If you are not an admin
in that case, you just can't do all of this.

Seemingly simple thing turns out not to be so simple...

--
Michael Mirman
MathWorks, Inc.
508-647-7555


-----Original Message-----
From: perforce-user [mailto:perforce-user-bounces@perforce.com] On
Behalf Of umair
Sent: Tuesday, January 5, 2016 7:00 AM
To: perforce-user@perforce.com
Subject: [p4] quick way to delete a stream along with all associated clients
and pending changelists

Posted on behalf of forum user 'umair'.

Hi. I am using p4v.
I have a lot of streams which I want to delete.
The problem is that I have to delete every associated workspace manually
along
with its pending changelists.

Is there a faster way to get rid of a stream along with all associated
workspaces (with pending CLs)??

If this is not possible in p4v.

What would be the way to accomplish this with p4 (in linux).

Thanks.



--
Please click here to see the post in its original format:
  http://forums.perfor...-way-to-delete-
a-stream-along-with-all-associated-clients-and-pending-changelists
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user



#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 06 January 2016 - 12:45 AM

View Postumair, on 05 January 2016 - 11:57 AM, said:

Hi. I am using p4v.
I have a lot of streams which I want to delete.
The problem is that I have to delete every associated workspace manually along with its pending changelists.

Is there a faster way to get rid of a stream along with all associated workspaces (with pending CLs)??

If this is not possible in p4v.

What would be the way to accomplish this with p4 (in linux).

Thanks.

Have you considered obliterate? This article here covers this as an option also:

  http://answers.perfo...rticles/KB/6823

#5 Mailman Sync

Mailman Sync

    Advanced Member

  • Maillist Aggregator
  • 2495 posts

Posted 06 January 2016 - 03:05 AM

Originally posted to the perforce-user mailing list by: Michael Mirman


Hi Shimada -

I wonder what you propose to obliterate.
Obliterate works fine for submitted files.
Deleting a stream involves clients, pending/shelved changes, and jobs. Deleting a stream is really deleting a stream spec.
We - even when we delete stream - want files to stay in the repo, so we would keep the integration history.
When we delete a stream,  it is about "closing" that place in the repo for submissions (forever).

--Michael Mirman
508-647-7555
MathWorks, Inc.
3 Apple Hill Dr, Natick, MA 01760


-----Original Message-----
From: perforce-user [mailto:perforce-user-bounces@perforce.com] On Behalf Of P4Shimada
Sent: Tuesday, January 5, 2016 7:50 PM
To: perforce-user@perforce.com
Subject: Re: [p4] quick way to delete a stream along with all associated clients and pending changelists

Posted on behalf of forum user 'P4Shimada'.



[http://forums.perfor...post&pid=19275]
umair, on 2016/01/05 11:57:28 UTC, said:

Quote

   Hi. I am using p4v.
  I have a lot of streams which I want to delete.
  The problem is that I have to delete every associated workspace manually along with its pending changelists.

  Is there a faster way to get rid of a stream along with all associated workspaces (with pending CLs)??

  If this is not possible in p4v.

  What would be the way to accomplish this with p4 (in linux).

  Thanks.

Have you considered obliterate? This article here covers this as an option also:

��   http://answers.perfo...rticles/KB/6823



--
Please click here to see the post in its original format:
  http://forums.perfor...ing-changelists
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user



#6 umair

umair

    Member

  • Members
  • PipPip
  • 19 posts

Posted 08 January 2016 - 06:21 AM

Hi P4Shmida.
The obliterate option on a stream does not automatically delete corresponding workspaces, pending CLs.
It would be great if there is quick way for this.

Mailman Sync thanks for your response.





Also tagged with one or more of these keywords: streams, stream workspaces, workspaces, delete, p4v, p4

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users