threads / discuss / 12761

StGit: kha/safe and kha/experimental updated

Subject: StGit: kha/safe and kha/experimental updated

## tl;dr

5 messages between Mar 19, 2008 and Mar 25, 2008.

replies: 4people: 2as markdown or json

Karl Hasselström· Mar 19, 2008, 01:28 UTC · lore

kha/safe contains two patches that were posted to the list quite some time ago. Sorry for the delay! kha/experimental still has the new/delete rewrites from way back when, plus a new and shiny "stg reset" prototype!

                                 -+-
The following changes since commit 0a03ab4518fca921a8f427d283f29c0fe3625cb2:
  Onno Kortmann (1):
        Test the 'stg rename' command
are available in the git repository at:
  git://repo.or.cz/stgit/kha.git safe
Alex Chiang (1):
      Better "stg rebase" help text
Angus Salkeld (1):
      stg mail crashes when there is no patch description
 stgit/commands/mail.py   |    9 +++++++--
 stgit/commands/rebase.py |   14 +++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)
                                 -+-
The following changes since commit 70bbc1a3d57cfe0e5eb6839a7889201fdeaa3cd6:
  Angus Salkeld (1):
        stg mail crashes when there is no patch description
are available in the git repository at:
  git://repo.or.cz/stgit/kha.git experimental
Karl Hasselström (12):
      Disable patchlog test for "stg new"
      Convert "stg new" to the new infrastructure
      Refactor --author/--committer options
      Let "stg new" support more message options
      Emacs mode: use "stg new --file"
      Convert "stg delete" to the new infrastructure
      Emacs mode: delete patches
      Add property with a list of all patch names
      Library functions for tree and blob manipulation
      Write to a stack log when stack is modified
      Add utility function for reordering patches
      New command: stg reset
 contrib/stgit.el           |   33 +++++++---
 stgit/commands/branch.py   |   18 ++++--
 stgit/commands/clone.py    |    3 +-
 stgit/commands/coalesce.py |    3 +-
 stgit/commands/commit.py   |    6 +-
 stgit/commands/common.py   |   33 +++-------
 stgit/commands/delete.py   |   70 ++++++---------------
 stgit/commands/edit.py     |   26 +-------
 stgit/commands/float.py    |    3 +
 stgit/commands/fold.py     |    3 +-
 stgit/commands/imprt.py    |    3 +-
 stgit/commands/init.py     |    3 +-
 stgit/commands/new.py      |   97 ++++++++++++++++-------------
 stgit/commands/pick.py     |    3 +-
 stgit/commands/pop.py      |    3 +-
 stgit/commands/pull.py     |    3 +-
 stgit/commands/push.py     |    6 +-
 stgit/commands/rebase.py   |    4 +-
 stgit/commands/refresh.py  |    4 +-
 stgit/commands/rename.py   |    4 +-
 stgit/commands/reset.py    |   56 +++++++++++++++++
 stgit/commands/resolved.py |    4 +-
 stgit/commands/sink.py     |    3 +-
 stgit/commands/sync.py     |    5 +-
 stgit/commands/uncommit.py |    2 +-
 stgit/lib/git.py           |  147 ++++++++++++++++++++++++++++++++++++--------
 stgit/lib/log.py           |  105 +++++++++++++++++++++++++++++++
 stgit/lib/stack.py         |    1 +
 stgit/lib/transaction.py   |   17 +++++-
 stgit/main.py              |    2 +
 stgit/utils.py             |   50 +++++++++++++++
 t/t1400-patch-history.sh   |    2 -
 t/t1600-delete-one.sh      |    8 +-
 33 files changed, 523 insertions(+), 207 deletions(-)
 create mode 100644 stgit/commands/reset.py
 create mode 100644 stgit/lib/log.py
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Karl Hasselström· Mar 19, 2008, 01:38 UTC · re: Karl Hasselström · lore

Re: StGit: kha/safe and kha/experimental updated

On 2008-03-19 02:28:04 +0100, Karl Hasselström wrote:
> plus a new and shiny "stg reset" prototype!
It works like this:
  1. Every StGit command that modifies anything writes the new state
     to a log. The log is a git branch called <branchname>.stgit.
  2. When you've done something you regret, find the state in the log
     you want to return to and just say (for example)
       $ stg reset master.stgit~3
     Resetting is recorded in the log just like everything else, so to
     undo a reset you just did, simply say
       $ stg reset master.stgit^

There are lots of things that have to be ironed out before it's done, especially the UI, but it's ready for folks to play with and comment on.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Catalin Marinas· Mar 20, 2008, 15:25 UTC · re: Karl Hasselström · lore

Re: StGit: kha/safe and kha/experimental updated

On 19/03/2008, Karl Hasselström <kha@treskal.com> wrote:
Show 19 quoted lines
> On 2008-03-19 02:28:04 +0100, Karl Hasselström wrote:
>
>  > plus a new and shiny "stg reset" prototype!
>
>
> It works like this:
>
>   1. Every StGit command that modifies anything writes the new state
>      to a log. The log is a git branch called <branchname>.stgit.
>
>   2. When you've done something you regret, find the state in the log
>      you want to return to and just say (for example)
>
>        $ stg reset master.stgit~3
>
>      Resetting is recorded in the log just like everything else, so to
>      undo a reset you just did, simply say
>
>        $ stg reset master.stgit^
That's cool :-), thanks. We can even add aliases for 'undo' and 'redo'.
-- 
Catalin
Karl Hasselström· Mar 24, 2008, 18:26 UTC · re: Catalin Marinas · lore

Re: StGit: kha/safe and kha/experimental updated

On 2008-03-20 15:25:04 +0000, Catalin Marinas wrote:
> We can even add aliases for 'undo' and 'redo'.

It's not entirely clear (to me at least) exactly what undo and redo should do. Something like this maybe:

  undo: If the log begins with k "undo" entries (k >= 0), reset to
        log~(2k+1).
  redo: Find the most recent "undo" entry that hasn't been cancelled
        out by a "redo". If this is the most recent log entry (except
        the cancelled-out ones), reset to it; otherwise, complain that
        the last command was not an undo or redo.
I _think_ this does what one naively expects undo and redo to do.
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Catalin Marinas· Mar 25, 2008, 10:52 UTC · re: Karl Hasselström · lore

Re: StGit: kha/safe and kha/experimental updated

On 24/03/2008, Karl Hasselström <kha@treskal.com> wrote:
Show 17 quoted lines
> On 2008-03-20 15:25:04 +0000, Catalin Marinas wrote:
>
>  > We can even add aliases for 'undo' and 'redo'.
>
>
> It's not entirely clear (to me at least) exactly what undo and redo
>  should do. Something like this maybe:
>
>   undo: If the log begins with k "undo" entries (k >= 0), reset to
>         log~(2k+1).
>
>   redo: Find the most recent "undo" entry that hasn't been cancelled
>         out by a "redo". If this is the most recent log entry (except
>         the cancelled-out ones), reset to it; otherwise, complain that
>         the last command was not an undo or redo.
>
>  I _think_ this does what one naively expects undo and redo to do.

Yes, something like this. Anyway, this can be explained in the help without adding separate commands (at least for now).

-- 
Catalin

← back to recent threads