问题
I could stash my work in git and can revert back without losing my work. This will enable me get back to it if I need to.
Does Accureve have this option?
回答1:
The AccuRev command 'keep' will preserve your work, but not make it generally accessible to others. They can find it and use it, but it is still considered private to your workspace.
To keep all files, that are under AccuRev control, that you've modified run accurev keep -m -c "My work under development" The -m is to find modified and -c is for a comment.
回答2:
I like David Howland's answer with one caveat: a keep and a stash are different in nature. A stash is merely a patch (i.e. set of diffs) stored in a place...it has no influence on git's history. Keep (which I think is most analogous to git's commit) writes changes to AccuRev's database.
To see this in action, keep a change to a file you intend to stash, then view its history: it will include your "stashed" change. This will end up polluting the logs.
One option is to create a new workspace whenever you start to work on something different in parallel with your current work.
In summary, I don't think AccuRev has stash/shelveset functionality.
Update
Eclipse's Create/Apply Patch functionality might be what you're looking for:
- Create a patch file (in essence a stash/shelveset)
- Then re-apply that patch file to push back in the changes.
For whatever reason it doesn't seem to be matching up the diff's index's file locations correctly, but at least it's a step in the right direction.
回答3:
Keep would be the option which is most similar to git stash.
回答4:
In short no there is not.
You might be able to mimic this behavior by creating a new stream, re-parent your workspace to this stream, promote the changes you want to stash then re-parent to the original. Then when you want to "unstash" you change change pallet or apply a patch to your workspace.
来源:https://stackoverflow.com/questions/19765112/does-accurev-support-stashing