# StGit: kha/{stable,safe,experimental} updated

6 messages from 2008-04-13 to 2008-04-15. Participants: Karl Hasselström, Samuel Tardieu.
Thread: https://gitlist.dev/t/13094

## Karl Hasselström, 2008-04-13 19:11

Subject: StGit: kha/{stable,safe,experimental} updated
Message-ID: <20080413191140.GA1912@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080413191140.GA1912%40diana.vm.bytemark.co.uk

```
I've rebased my branches on top of Catalin's latest master and stable.
They include all the patches I've sent to the list recently.

I've added a "stable" branch, for patches intended for Catalin's
"stable".

In the experimental branch, I've updated the reset command a bit -- it
should now be quite usable. Bug reports and feature requests and
general comments welcome. (Note to those who already run my
experimental branch: I've changed the stack log format, so you'll have
to nuke your <branchname>.stgit branches. StGit will remind you if you
forget.)


                                 -+-


The following changes since commit bd3f01319a03fc883d391f24639176f0f65727e5:
  Catalin Marinas (1):
        Release 0.14.2

are available in the git repository at:

  git://repo.or.cz/stgit/kha.git stable

Karl Hasselström (1):
      Fix problems in t1000-branch-create

 t/t1000-branch-create.sh |   56 +++++++++++++++++++++++++++++----------------
 1 files changed, 36 insertions(+), 20 deletions(-)


                                 -+-


The following changes since commit 719309aa54c8fa43bd8700f09b1e293923ed4e0a:
  Catalin Marinas (1):
        Merge branch 'stable'

are available in the git repository at:

  git://repo.or.cz/stgit/kha.git safe

Karl Hasselström (5):
      Fix problems in t1000-branch-create
      Merge branch 'stable' into stable-master-merge
      Don't both change directory and set GIT_WORK_TREE
      Log environment and cwd as well as the actual command
      emacs mode: handle "stg status" output with #

 contrib/stgit.el         |    2 +-
 stgit/lib/git.py         |   14 +++++++----
 stgit/run.py             |    6 +++++
 t/t1000-branch-create.sh |   56 +++++++++++++++++++++++++++++----------------
 4 files changed, 52 insertions(+), 26 deletions(-)


                                 -+-


The following changes since commit 999dcbc241e377f8b39f0064dd8cc1670e667f18:
  Karl Hasselström (1):
        emacs mode: handle "stg status" output with #

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     |    4 +-
 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    |   67 ++++++++++++++++++++
 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           |  130 ++++++++++++++++++++++++++++++++++++++
 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, 559 insertions(+), 208 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

```

## Samuel Tardieu, 2008-04-14 06:44

Subject: Re: StGit: kha/{stable,safe,experimental} updated
Message-ID: <2008-04-14-08-44-30+trackit+sam@rfc1149.net>
URL: https://gitlist.dev/e/2008-04-14-08-44-30%2Btrackit%2Bsam%40rfc1149.net
In-Reply-To: <20080413191140.GA1912@diana.vm.bytemark.co.uk>

```
>>>>> "Karl" == Karl Hasselström <kha@treskal.com> writes:

Karl> In the experimental branch, I've updated the reset command a bit
Karl> -- it should now be quite usable. Bug reports and feature
Karl> requests and general comments welcome. (Note to those who
Karl> already run my experimental branch: I've changed the stack log
Karl> format, so you'll have to nuke your <branchname>.stgit
Karl> branches. StGit will remind you if you forget.)

Karl,

I was using the StGit in Debian/unstable and just switched to your
experimental branch.

When doing "stg pull", I get, at the end:

Pushing patch "pr20822" ... done
Pushing patch "pr22387" ... done
Pushing patch "pr30614" ... done
Error: Unhandled exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/stgit/main.py", line
  280, in main
    ret = command.func(parser, options, args)
  File
  "/usr/local/lib/python2.4/site-packages/stgit/commands/pull.py",
  line 109, in func
    log.log_entry(log.default_stack(), 'stg pull')
  File "/usr/local/lib/python2.4/site-packages/stgit/lib/log.py", line
  45, in log_entry
    stack.repository.refs.get(ref))]
  File "/usr/local/lib/python2.4/site-packages/stgit/lib/log.py", line
  94, in __init__
    self.unapplied, patches = pl('unapplied')
  File "/usr/local/lib/python2.4/site-packages/stgit/lib/log.py", line
  89, in pl
    return ([pn for sha1, pn in patches],
ValueError: need more than 0 values to unpack

Note that I have no unapplied patch in case it matters, only hidden
ones (and applied ones of course).

```

## Karl Hasselström, 2008-04-14 07:03

Subject: Re: StGit: kha/{stable,safe,experimental} updated
Message-ID: <20080414070348.GA9135@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080414070348.GA9135%40diana.vm.bytemark.co.uk
In-Reply-To: <2008-04-14-08-44-30+trackit+sam@rfc1149.net>

```
On 2008-04-14 08:44:29 +0200, Samuel Tardieu wrote:

> I was using the StGit in Debian/unstable and just switched to your
> experimental branch.
>
> When doing "stg pull", I get, at the end:
>
> Pushing patch "pr20822" ... done
> Pushing patch "pr22387" ... done
> Pushing patch "pr30614" ... done
> Error: Unhandled exception:
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.4/site-packages/stgit/main.py", line
>   280, in main
>     ret = command.func(parser, options, args)
>   File
>   "/usr/local/lib/python2.4/site-packages/stgit/commands/pull.py",
>   line 109, in func
>     log.log_entry(log.default_stack(), 'stg pull')
>   File "/usr/local/lib/python2.4/site-packages/stgit/lib/log.py", line
>   45, in log_entry
>     stack.repository.refs.get(ref))]
>   File "/usr/local/lib/python2.4/site-packages/stgit/lib/log.py", line
>   94, in __init__
>     self.unapplied, patches = pl('unapplied')
>   File "/usr/local/lib/python2.4/site-packages/stgit/lib/log.py", line
>   89, in pl
>     return ([pn for sha1, pn in patches],
> ValueError: need more than 0 values to unpack

Euh! Thanks for the report, I'll look into it tonight after work.

> Note that I have no unapplied patch in case it matters, only hidden
> ones (and applied ones of course).

Yeah, that might be a clue. Though I was under the impression that I'd
tested it with a fully applied stack ... I guess the test suite needs
an addition or two.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```

## Karl Hasselström, 2008-04-14 08:11

Subject: Re: StGit: kha/{stable,safe,experimental} updated
Message-ID: <20080414081139.GB9135@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080414081139.GB9135%40diana.vm.bytemark.co.uk
In-Reply-To: <20080414070348.GA9135@diana.vm.bytemark.co.uk>

```
On 2008-04-14 09:03:48 +0200, Karl Hasselström wrote:

> Though I was under the impression that I'd tested it with a fully
> applied stack ... I guess the test suite needs an addition or two.

The real proble turned out to be a certain developer who remembers
running the test suite before pushing out his branches, even though no
such thing occurred. Ahem.

This fixes the bug for me; I'll be squashing it into one of the other
patches tonight. Sorry for the breakage.

diff --git a/stgit/lib/log.py b/stgit/lib/log.py
index 083a546..1830cbd 100644
--- a/stgit/lib/log.py
+++ b/stgit/lib/log.py
@@ -84,7 +84,7 @@ class Log(object):
         def pl(name):
             patches = [x.split() for x in
                        self.commit.data.tree.data.entries[name][1]
-                       .data.str.strip().split('\n')]
+                       .data.str.strip().split('\n') if x]
             # TODO: handle case where we don't have the commit object.
             return ([pn for sha1, pn in patches],
                     dict((pn, repo.get_commit(sha1)) for sha1, pn in patches))

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```

## Karl Hasselström, 2008-04-14 20:08

Subject: Re: StGit: kha/{stable,safe,experimental} updated
Message-ID: <20080414200814.GA21039@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080414200814.GA21039%40diana.vm.bytemark.co.uk
In-Reply-To: <20080414081139.GB9135@diana.vm.bytemark.co.uk>

```
On 2008-04-14 10:11:39 +0200, Karl Hasselström wrote:

> This fixes the bug for me; I'll be squashing it into one of the
> other patches tonight. Sorry for the breakage.

Done, and pushed out.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```

## Karl Hasselström, 2008-04-15 00:26

Subject: Re: StGit: kha/{stable,safe,experimental} updated
Message-ID: <20080415002613.GA24093@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080415002613.GA24093%40diana.vm.bytemark.co.uk
In-Reply-To: <20080413191140.GA1912@diana.vm.bytemark.co.uk>

```
On 2008-04-13 21:11:40 +0200, Karl Hasselström wrote:

> I've rebased my branches on top of Catalin's latest master and
> stable. They include all the patches I've sent to the list recently.

Updated again with the newest stuff. No shortlog since it's hardly
changed since last post. Get it here:

  git://repo.or.cz/stgit/kha.git stable
  git://repo.or.cz/stgit/kha.git safe
  git://repo.or.cz/stgit/kha.git experimental

And this time I made _sure_ to run the test suite.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```
