Reputation: 7585
How are you doing this task in Perforce ?
Upvotes: 18
Views: 3195
Reputation: 1
AFAIK you can't. I can't fault perforce for not having that feature as it's quite old software, but I can most certainly despise it for it. "We don't use perforce around here, right?" is a perfectly good question for my next job interview. The first distributed VCS I used was Mercurial, then I switched to git on the basis of this feature alone.
Upvotes: 0
Reputation: 2002
Yes, you can't do that.
The only thing you can do would be:
Then you still have the file in checkout, with the other modifications.
Upvotes: 25
Reputation: 49320
You can't. As with some other version control systems, you operate on a per file basis. That is, a single file is the smallest entity / unit of work possible.
I'd think that they all act on the presumption that changes to a file are atomic (most good version control systems will even use a commit of multiple files as an atomic operation).
If you only want to commit some parts, you essentially have to create a copy of your modified file, where you reset all those parts that you don't want to change back to their original content/text. Or better yet, only change one thing at a time and eventually separately commit those changes.
Upvotes: 10