[StGit PATCH 0/2] "stg assimilate" on steroids
- From
Karl Hasselström <kha@treskal.com>
- Date
- Sep 26, 2007, 02:15 UTC
- Message-ID
- <20070926020911.1202.2580.stgit@yoghurt>
This makes "stg assimilate" a whole lot more useful, and replaces my DAG appliedness series. (If you have been using that, manually change the stack format version back to 2, and create empty "applied" and "unapplied" files, and run the new assimilate. That should fix it. I hope. I'll be testing it myself tomorrow.)
Here's what assimilate says about itself:
"assimilate" will repair three kinds of inconsistencies in your StGit stack, all of them caused by using plain git commands on the branch:
1. If you have made regular git commits on top of your stack of
StGit patches, "assimilate" converts them to StGit patches,
preserving their contents. 2. Merge commits cannot become patches; if you have committed a
merge on top of your stack, "assimilate" will simply mark all
patches below the merge unapplied, since they are no longer
reachable. If this is not what you want, use "git reset" to get
rid of the merge and run "assimilate" again. 3. The applied patches are supposed to be precisely those that are
reachable from the branch head. If you have used e.g. "git
reset" to move the head, some applied patches may no longer be
reachable, and some unapplied patches may have become
reachable. "assimilate" will correct the appliedness of such
patches.Note that these are "inconsistencies", not "errors"; furthermore, "assimilate" will repair them reliably. As long as you are satisfied with the way "assimilate" handles them, you have no reason to avoid causing them in the first place if that is convenient for you.
---
Karl Hasselström (2):
Test the new powers of "stg assimilate"
Teach "stg assimilate" to repair patch reachabilitystgit/commands/assimilate.py | 190 +++++++++++++++++++++++++++++++---------- stgit/commands/common.py | 6 + stgit/stack.py | 6 + t/t1301-assimilate.sh | 12 +-- t/t1302-assimilate-interop.sh | 59 +++++++++++++ 5 files changed, 216 insertions(+), 57 deletions(-) create mode 100755 t/t1302-assimilate-interop.sh
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle