git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGit PATCH 00/10] Updated "stg reset" series

From
Karl Hasselström <kha@treskal.com>
Date
Apr 20, 2008, 22:10 UTC
Message-ID
<20080420215625.5837.82896.stgit@yoghurt>

The patch stack log / stg reset series has matured over the weekend. The major highlights are

  1. When a command fails to push a patch due to conflicts, it will
     log two entries -- one for the part of the command that
     succeeded, and one just for the conflicting push. This makes it
     possible to undo just the last part, and not the whole command.
  2. I've tightened the checks so that conflicts will prevent most
     commands from working unless they actively claim to make sense in
     the face of conflicts. Basically, only commands that don't touch
     the topmost patch should be able to run when there are conflicts.
  3. stg reset now understands --hard, which makes it zonk any local
     changes, including conflicts.
(1) and (3) means that
  $ stg reset --hard <branchname>.stgit^~1

can be used instead of stg push --undo when you want to undo a conflicting push. Now I just have to make that available as

  $ stg undo
so that it actually becomes usable ...
These patches are available at
  git://repo.or.cz/stgit/kha.git experimental
---
Karl Hasselström (10):
      Don't write a log entry if there were no changes
      Add a --hard flag to stg reset
      Log conflicts separately for all commands
      Log conflicts separately
      New command: stg reset
      Add utility function for reordering patches
      Write to a stack log when stack is modified
      Library functions for tree and blob manipulation
      Add property with a list of all patch names
      Prevent most commands from running when there are conflicts
 stgit/commands/branch.py   |   20 ++++-
 stgit/commands/clean.py    |    3 +
 stgit/commands/coalesce.py |    6 +-
 stgit/commands/commit.py   |   13 ++--
 stgit/commands/common.py   |    8 ++
 stgit/commands/delete.py   |   14 +++-
 stgit/commands/diff.py     |    2 -
 stgit/commands/edit.py     |    3 +
 stgit/commands/export.py   |    2 -
 stgit/commands/files.py    |    2 -
 stgit/commands/id.py       |    2 -
 stgit/commands/log.py      |    2 -
 stgit/commands/mail.py     |    2 -
 stgit/commands/patches.py  |    2 -
 stgit/commands/reset.py    |  118 ++++++++++++++++++++++++++++++++
 stgit/commands/series.py   |    2 -
 stgit/commands/show.py     |    2 -
 stgit/commands/status.py   |    3 +
 stgit/commands/top.py      |    2 -
 stgit/commands/uncommit.py |    5 +
 stgit/lib/git.py           |  143 +++++++++++++++++++++++++++++++++------
 stgit/lib/log.py           |  161 ++++++++++++++++++++++++++++++++++++++++++++
 stgit/lib/stack.py         |    8 ++
 stgit/lib/transaction.py   |   92 ++++++++++++++++++++-----
 stgit/main.py              |    4 +
 t/t3100-reset.sh           |  151 +++++++++++++++++++++++++++++++++++++++++
 t/t3101-reset-hard.sh      |   56 +++++++++++++++
 27 files changed, 754 insertions(+), 74 deletions(-)
 create mode 100644 stgit/commands/reset.py
 create mode 100644 stgit/lib/log.py
 create mode 100755 t/t3100-reset.sh
 create mode 100755 t/t3101-reset-hard.sh
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Next: Karl Hasselström
Message 1 of 11 in “Updated "stg reset" series”
  1. 00/10 Updated "stg reset" seriesKarl Hasselström, Apr 20, 2008
  2. 01/10 Prevent most commands from running when there are conflictsKarl Hasselström, Apr 20, 2008
  3. 02/10 Add property with a list of all patch namesKarl Hasselström, Apr 20, 2008
  4. 03/10 Library functions for tree and blob manipulationKarl Hasselström, Apr 20, 2008
  5. 04/10 Write to a stack log when stack is modifiedKarl Hasselström, Apr 20, 2008
  6. 05/10 Add utility function for reordering patchesKarl Hasselström, Apr 20, 2008
  7. 06/10 New command: stg resetKarl Hasselström, Apr 20, 2008
  8. 07/10 Log conflicts separatelyKarl Hasselström, Apr 20, 2008
  9. 08/10 Log conflicts separately for all commandsKarl Hasselström, Apr 20, 2008
  10. 09/10 Add a --hard flag to stg resetKarl Hasselström, Apr 20, 2008
  11. 10/10 Don't write a log entry if there were no changesKarl Hasselström, Apr 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.