Jump to content

Interactive staging of changed contents


Recommended Posts

I'm often working with patches for 3rd party code which I need integrate into our plastic repo, along with our own (1st party) changes to this 3rd party code.

 

With git this process was very straightforward. There are different methodologies for different situations:

- copy the updated contents of the 3rd party library into the working tree, which naturally removed our own modifications, then use `git add -p' to recover our modifications as needed.

- cherry pick any commits corresponding to our modifications (if those modifications represent a large "feature" which is easily lost in a sea of individual small patch hunks).

- `git apply --reject' patch files and manually fix the rejected hunks.

 

With plastic I have not really found a good way to replicate any of these workflows. The closest thing we have is the "diff changes" window but it doesn't let you apply/stage individual hunks. Plastic doesn't seem to have any concept of a staging area, so I'm doubtful that `git add -p' could even be supported (this single command is the workhorse of this entire process). Cherry picking in plastic does nothing if you're cherry picking an ancestor of your current branch tip (tells me "merge destination already contains source changes", yes I understand what this means and why plastic rejects it, but its exactly what I want to do in this case - integrate the same change *again*).

I'm wondering if anyone has found some equivalent workflows to those above. At this point I've resorted to applying my changes manually (i.e. with a text editor); or creating a git repository temporarily with one commit (the current contents) so I can simply use those workflows above. But this is highly unsatisfactory, as I'm not able to work with the repo history directly, have to constantly use `cm blame` to track down origins of changes, although blame and the 2d revision tree in the GUI are pretty good, it gets quite tedious to constantly navigate back & forth for hundreds of changes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...