[p4] Demerging in Perforce in General

Weintraub, David david.weintraub at bofasecurities.com
Thu Jul 27 07:02:48 PDT 2006


Thanks everyone for your reply. I was looking into the "p4 integrate"
command to perform this task because most other VCSs use their "merge"
command to do this task. I just could figure out how to do it without
creating another branch.

Instead, according to the tech note, you use a sequence of "p4 sync" and
"p4 resolve" commands to do this particular task:

* Sync to the version just before the changeset you want to demerge.
* Checkout the files that will be affected by the changeset you want to
demerge (this is found by looking at the file list in the changeset).
* Sync to the version you want to remove. The files that will be
demerged won't be sync'd to this version because they're already opened.
* Do a "p4 resolve" and "accept your" changes. This will mark the files
you want to demerge as resolved without changing their contents.
* Sync to the head
* Next, do an automatic resolve to finalize and submit the changes.

A bit messier than some version control systems, but it does make
logical sense. Fortunately, it isn't a task that needs to be done on a
regular basis.

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Weintraub,
David
Sent: Thursday, July 27, 2006 8:04 AM
To: perforce-user at perforce.com
Subject: [p4] Demerging in Perforce in General

Actually, this brings up an interesting question...

How do you "unmerge" code from a file? In most version control systems,
you can specify a merge in reverse to say "remove any changes that this
particular version of the file had made". It can be important to undo
something that shouldn't have been included in the version in the first
place.

It looks like you can sort of do this via the "p4 integrate" command,
but only by creating a new branch in the first place. However, I'm
looking for a two things:

* Demerging without branching. Sort of controversial, but other version
control systems do allow it.
* A way of demerging an entire branch that was previously merged into
another branch.

Is this possible in Perforce?

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Aklujkar,
Abhijit
Sent: Thursday, July 27, 2006 5:13 AM
To: perforce-user at perforce.com
Subject: [p4] unsync the change list from the latest..??

Hi All,

How do we unsync or ignore a particular change list from the latest
submitted code...??

 

Thank You.

 

~ Abhi

 

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user



More information about the perforce-user mailing list