* StGit: kha/{safe,experimental} updated
@ 2008-05-14 1:43 Karl Hasselström
2008-05-19 21:21 ` Catalin Marinas
0 siblings, 1 reply; 8+ messages in thread
From: Karl Hasselström @ 2008-05-14 1:43 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
kha/safe has improved version handling: "stg --version" will now
present a detailed version number just like git does:
$ stg --version
Stacked GIT 0.14.2.152.g77bd
kha/safe also has an improvement/bugfix to the emacs mode: it will
automatically cd up to the root of your worktree, just like git's
emacs mode has done since forever.
kha/experimental has a new command, stg redo. The combination undo +
redo makes it easy to move back and forth in the patch stack history.
-+-
The following changes since commit d9b2f20a72706d6b4f553a8a8e25bd67f87ed616:
Karl Hasselström (1):
Use test_cmp instead of diff -u in the test suite
are available in the git repository at:
git://repo.or.cz/stgit/kha.git safe
Karl Hasselström (4):
Remove "stg" from start of log messages
Import version to a separate namespace
Better StGit version tracking
Emacs mode: automatically cd up to root of worktree
contrib/stgit.el | 13 ++++++++++-
setup.py | 14 ++++++-----
stgit/.gitignore | 1 +
stgit/commands/clean.py | 2 +-
stgit/commands/coalesce.py | 2 +-
stgit/commands/commit.py | 2 +-
stgit/commands/edit.py | 2 +-
stgit/commands/goto.py | 2 +-
stgit/commands/uncommit.py | 2 +-
stgit/version.py | 52 +++++++++++++++++++++++++++++++++++++++++++-
10 files changed, 78 insertions(+), 14 deletions(-)
-+-
The following changes since commit 52144ce5f2bfb1268aee4a9999821987f8892dbf:
Karl Hasselström (1):
Emacs mode: automatically cd up to root of worktree
are available in the git repository at:
git://repo.or.cz/stgit/kha.git experimental
Karl Hasselström (20):
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
Prevent most commands from running when there are conflicts
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
Log conflicts separately
Log conflicts separately for all commands
Add a --hard flag to stg reset
Don't write a log entry if there were no changes
Move stack reset function to a shared location
New command: stg undo
New command: stg redo
contrib/stgit.el | 33 ++++--
stgit/commands/branch.py | 19 ++-
stgit/commands/clean.py | 2 +-
stgit/commands/coalesce.py | 6 +-
stgit/commands/commit.py | 13 ++-
stgit/commands/common.py | 41 +++----
stgit/commands/delete.py | 76 +++++--------
stgit/commands/diff.py | 2 +-
stgit/commands/edit.py | 28 +----
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/new.py | 97 +++++++++-------
stgit/commands/patches.py | 2 +-
stgit/commands/redo.py | 52 +++++++++
stgit/commands/reset.py | 61 ++++++++++
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/commands/undo.py | 49 ++++++++
stgit/lib/git.py | 154 +++++++++++++++++++++-----
stgit/lib/log.py | 265 ++++++++++++++++++++++++++++++++++++++++++++
stgit/lib/stack.py | 8 ++
stgit/lib/transaction.py | 93 ++++++++++++---
stgit/main.py | 8 ++
stgit/utils.py | 50 ++++++++
t/t1400-patch-history.sh | 2 -
t/t1600-delete-one.sh | 8 +-
t/t3100-reset.sh | 151 +++++++++++++++++++++++++
t/t3101-reset-hard.sh | 56 +++++++++
t/t3102-undo.sh | 86 ++++++++++++++
t/t3103-undo-hard.sh | 56 +++++++++
t/t3104-redo.sh | 122 ++++++++++++++++++++
37 files changed, 1339 insertions(+), 225 deletions(-)
create mode 100644 stgit/commands/redo.py
create mode 100644 stgit/commands/reset.py
create mode 100644 stgit/commands/undo.py
create mode 100644 stgit/lib/log.py
create mode 100755 t/t3100-reset.sh
create mode 100755 t/t3101-reset-hard.sh
create mode 100755 t/t3102-undo.sh
create mode 100755 t/t3103-undo-hard.sh
create mode 100755 t/t3104-redo.sh
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: StGit: kha/{safe,experimental} updated
2008-05-14 1:43 Karl Hasselström
@ 2008-05-19 21:21 ` Catalin Marinas
2008-05-20 7:04 ` Karl Hasselström
0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2008-05-19 21:21 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
On 14/05/2008, Karl Hasselström <kha@treskal.com> wrote:
> kha/safe has improved version handling: "stg --version" will now
> present a detailed version number just like git does:
>
> $ stg --version
> Stacked GIT 0.14.2.152.g77bd
Thanks, I merged this patch. I create a similar patch some weeks ago
(just some naming differences and only use the id of the HEAD) but
went on holiday + a conference and forgot about it. Anyway, yours
looks fine but I'll modify it slightly to use just 0.14.2 if a file
named ".release" exists in the working directory. I did this with my
patch to allow building of release tarballs without the git
information. Do you have any better suggestion?
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: StGit: kha/{safe,experimental} updated
2008-05-19 21:21 ` Catalin Marinas
@ 2008-05-20 7:04 ` Karl Hasselström
2008-05-20 17:19 ` Catalin Marinas
0 siblings, 1 reply; 8+ messages in thread
From: Karl Hasselström @ 2008-05-20 7:04 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On 2008-05-19 22:21:17 +0100, Catalin Marinas wrote:
> On 14/05/2008, Karl Hasselström <kha@treskal.com> wrote:
>
> > kha/safe has improved version handling: "stg --version" will now
> > present a detailed version number just like git does:
> >
> > $ stg --version
> > Stacked GIT 0.14.2.152.g77bd
>
> Thanks, I merged this patch. I create a similar patch some weeks ago
> (just some naming differences and only use the id of the HEAD) but
> went on holiday + a conference and forgot about it. Anyway, yours
> looks fine but I'll modify it slightly to use just 0.14.2 if a file
> named ".release" exists in the working directory. I did this with my
> patch to allow building of release tarballs without the git
> information. Do you have any better suggestion?
The system I built works like this at install time:
i1. Create stgit/builtin_version.py, populated with git-describe
output.
i2. Install as usual.
And at runtime:
r1. If we have a .git directory, ask git what version we are.
(Actually, we just try to run git describe and see if it
succeeds.)
r2. Otherwise, go with the built-in version (only works if
stgit/builtin_version.py exists).
Now, as to released versions, you could simply plop a suitably
prepared stgit/builtin_version.py in the tarball, and it'll all work.
i1 should fail silently when run from an unpacked tarball, so i2 will
pick up the builtin_version.py from the tarball. And at runtime, r1
will fail and we'll fall back to r2.
Oh, and please consider making annotated release tags in the future.
As is, I had to ask git-describe to look at unannotated tags as well,
which won't be so good in case a developer uses those as a scratch pad
while developing.
( The reason to do r1 before r2 is that otherwise an StGit tree will
"stick" with the version it had at the time the last installation
was run from that tree. We might fix that if we make sure to delete
builtin_version.py immediately after the installation. That's
desirable since any installed version of StGit currently runs
git-describe unnecessarily. )
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: StGit: kha/{safe,experimental} updated
2008-05-20 7:04 ` Karl Hasselström
@ 2008-05-20 17:19 ` Catalin Marinas
2008-05-20 21:02 ` Karl Hasselström
0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2008-05-20 17:19 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
2008/5/20 Karl Hasselström <kha@treskal.com>:
> The system I built works like this at install time:
>
> i1. Create stgit/builtin_version.py, populated with git-describe
> output.
>
> i2. Install as usual.
Fine (with some notes for releases, see below).
> And at runtime:
>
> r1. If we have a .git directory, ask git what version we are.
> (Actually, we just try to run git describe and see if it
> succeeds.)
>
> r2. Otherwise, go with the built-in version (only works if
> stgit/builtin_version.py exists).
OK.
> Now, as to released versions, you could simply plop a suitably
> prepared stgit/builtin_version.py in the tarball, and it'll all work.
> i1 should fail silently when run from an unpacked tarball, so i2 will
> pick up the builtin_version.py from the tarball. And at runtime, r1
> will fail and we'll fall back to r2.
I build release tarball from the directory under Git control and I
always get a builtin_version.py generated. In my initial patch I had a
check in setup.py for a .release file. I could add a check in
write_builtin_version to ignore the extra .git stuff if I am making a
release (only keep the tag name).
Another alternative is to check for the number of commits from the
latest tag and, if this is 0, simply ignore the Git id.
BTW, Git seems to use 6 characters for the current commit id and StGIT
5. Should we change this for consistency?
> Oh, and please consider making annotated release tags in the future.
> As is, I had to ask git-describe to look at unannotated tags as well,
> which won't be so good in case a developer uses those as a scratch pad
> while developing.
I always thought annotated tags are created by default. I'll do this
from now on.
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: StGit: kha/{safe,experimental} updated
2008-05-20 17:19 ` Catalin Marinas
@ 2008-05-20 21:02 ` Karl Hasselström
2008-05-21 14:07 ` Catalin Marinas
0 siblings, 1 reply; 8+ messages in thread
From: Karl Hasselström @ 2008-05-20 21:02 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On 2008-05-20 18:19:02 +0100, Catalin Marinas wrote:
> 2008/5/20 Karl Hasselström <kha@treskal.com>:
>
> > The system I built works like this at install time:
> >
> > i1. Create stgit/builtin_version.py, populated with git-describe
> > output.
> >
> > i2. Install as usual.
>
> Fine (with some notes for releases, see below).
>
> > And at runtime:
> >
> > r1. If we have a .git directory, ask git what version we are.
> > (Actually, we just try to run git describe and see if it
> > succeeds.)
> >
> > r2. Otherwise, go with the built-in version (only works if
> > stgit/builtin_version.py exists).
>
> OK.
>
> > Now, as to released versions, you could simply plop a suitably
> > prepared stgit/builtin_version.py in the tarball, and it'll all
> > work. i1 should fail silently when run from an unpacked tarball,
> > so i2 will pick up the builtin_version.py from the tarball. And at
> > runtime, r1 will fail and we'll fall back to r2.
>
> I build release tarball from the directory under Git control and I
> always get a builtin_version.py generated. In my initial patch I had
> a check in setup.py for a .release file. I could add a check in
> write_builtin_version to ignore the extra .git stuff if I am making
> a release (only keep the tag name).
Nah, easier to just change the order of the checks (try r2 before r1)
as I outlined. I'll whip up a patch.
> Another alternative is to check for the number of commits from the
> latest tag and, if this is 0, simply ignore the Git id.
If you're exactly on a tagged commit, git-describe will return just
the name of that tag, so you don't need to do anything extra.
> BTW, Git seems to use 6 characters for the current commit id and
> StGIT 5. Should we change this for consistency?
Both git and we call git-describe with --abbrev=4, which I think means
"describe the commit uniquely with as few digits as possible, but no
less than four". So we'll get upgraded automatically when it becomes
necessary.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 8+ messages in thread
* StGit: kha/{safe,experimental} updated
@ 2008-05-21 5:19 Karl Hasselström
0 siblings, 0 replies; 8+ messages in thread
From: Karl Hasselström @ 2008-05-21 5:19 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
I've promoted a bunch of stuff from "experimental" to "safe", so that
"experimental" currently only consists of the stack log stuff.
The stack log stuff in experimental now sports a rewrite of "stg log",
so that you can see what's in your log. This work is nearing
completion, or at least nearing the point where I'll be considering
moving it to "safe".
-+-
The following changes since commit 9564af74822b276d435319fc271eda591e5125a6:
Catalin Marinas (1):
Merge branch 'stable'
are available in the git repository at:
git://repo.or.cz/stgit/kha.git safe
Karl Hasselström (10):
Try the built-in version string before git-describe
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
Prevent most commands from running when there are conflicts
Add property with a list of all patch names
contrib/stgit.el | 33 +++++++++++----
setup.py | 45 +++++++++++---------
stgit/.gitignore | 1 -
stgit/commands/clean.py | 2 +-
stgit/commands/coalesce.py | 6 +-
stgit/commands/commit.py | 13 ++++--
stgit/commands/common.py | 33 +++++----------
stgit/commands/delete.py | 76 +++++++++++++----------------------
stgit/commands/edit.py | 28 ++----------
stgit/commands/new.py | 97 ++++++++++++++++++++++++-------------------
stgit/commands/uncommit.py | 5 +-
stgit/lib/git.py | 8 ++--
stgit/lib/stack.py | 1 +
stgit/lib/transaction.py | 27 ++++++++++--
stgit/utils.py | 50 ++++++++++++++++++++++
stgit/version.py | 15 +++++-
t/t1400-patch-history.sh | 2 -
t/t1600-delete-one.sh | 8 ++--
18 files changed, 255 insertions(+), 195 deletions(-)
-+-
The following changes since commit a5920051ee4326489c4b43e85d93f71d4c4ce34a:
Karl Hasselström (1):
Add property with a list of all patch names
are available in the git repository at:
git://repo.or.cz/stgit/kha.git experimental
Karl Hasselström (13):
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
Log conflicts separately
Log conflicts separately for all commands
Add a --hard flag to stg reset
Don't write a log entry if there were no changes
Move stack reset function to a shared location
New command: stg undo
New command: stg redo
Log and undo external modifications
Make "stg log" show stack log instead of patch log
stgit/commands/branch.py | 19 ++-
stgit/commands/common.py | 9 +-
stgit/commands/diff.py | 2 +-
stgit/commands/export.py | 2 +-
stgit/commands/files.py | 2 +-
stgit/commands/id.py | 2 +-
stgit/commands/log.py | 164 +++++++----------------
stgit/commands/mail.py | 2 +-
stgit/commands/patches.py | 2 +-
stgit/commands/redo.py | 52 +++++++
stgit/commands/reset.py | 56 ++++++++
stgit/commands/series.py | 2 +-
stgit/commands/show.py | 2 +-
stgit/commands/status.py | 3 +-
stgit/commands/top.py | 2 +-
stgit/commands/undo.py | 49 +++++++
stgit/lib/git.py | 146 +++++++++++++++++---
stgit/lib/log.py | 304 ++++++++++++++++++++++++++++++++++++++++++
stgit/lib/stack.py | 16 +++
stgit/lib/transaction.py | 115 +++++++++++-----
stgit/main.py | 8 +
t/t1400-patch-history.sh | 103 --------------
t/t3100-reset.sh | 151 +++++++++++++++++++++
t/t3101-reset-hard.sh | 56 ++++++++
t/t3102-undo.sh | 86 ++++++++++++
t/t3103-undo-hard.sh | 56 ++++++++
t/t3104-redo.sh | 122 +++++++++++++++++
t/t3105-undo-external-mod.sh | 68 ++++++++++
28 files changed, 1310 insertions(+), 291 deletions(-)
create mode 100644 stgit/commands/redo.py
create mode 100644 stgit/commands/reset.py
create mode 100644 stgit/commands/undo.py
create mode 100644 stgit/lib/log.py
delete mode 100755 t/t1400-patch-history.sh
create mode 100755 t/t3100-reset.sh
create mode 100755 t/t3101-reset-hard.sh
create mode 100755 t/t3102-undo.sh
create mode 100755 t/t3103-undo-hard.sh
create mode 100755 t/t3104-redo.sh
create mode 100755 t/t3105-undo-external-mod.sh
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: StGit: kha/{safe,experimental} updated
2008-05-20 21:02 ` Karl Hasselström
@ 2008-05-21 14:07 ` Catalin Marinas
2008-05-21 14:58 ` Karl Hasselström
0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2008-05-21 14:07 UTC (permalink / raw)
To: Karl Hasselström; +Cc: git
2008/5/20 Karl Hasselström <kha@treskal.com>:
> On 2008-05-20 18:19:02 +0100, Catalin Marinas wrote:
>> I build release tarball from the directory under Git control and I
>> always get a builtin_version.py generated. In my initial patch I had
>> a check in setup.py for a .release file. I could add a check in
>> write_builtin_version to ignore the extra .git stuff if I am making
>> a release (only keep the tag name).
>
> Nah, easier to just change the order of the checks (try r2 before r1)
> as I outlined. I'll whip up a patch.
[...]
> If you're exactly on a tagged commit, git-describe will return just
> the name of that tag, so you don't need to do anything extra.
Now that you mentioned this (I didn't know), is there a need to
reverse steps r2 and r1? I always build the release from the current
tag and the version should be clean.
>> BTW, Git seems to use 6 characters for the current commit id and
>> StGIT 5. Should we change this for consistency?
>
> Both git and we call git-describe with --abbrev=4, which I think means
> "describe the commit uniquely with as few digits as possible, but no
> less than four". So we'll get upgraded automatically when it becomes
> necessary.
OK, I didn't know this either.
--
Catalin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: StGit: kha/{safe,experimental} updated
2008-05-21 14:07 ` Catalin Marinas
@ 2008-05-21 14:58 ` Karl Hasselström
0 siblings, 0 replies; 8+ messages in thread
From: Karl Hasselström @ 2008-05-21 14:58 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On 2008-05-21 15:07:44 +0100, Catalin Marinas wrote:
> 2008/5/20 Karl Hasselström <kha@treskal.com>:
>
> > Nah, easier to just change the order of the checks (try r2 before
> > r1) as I outlined. I'll whip up a patch.
> [...]
> > If you're exactly on a tagged commit, git-describe will return
> > just the name of that tag, so you don't need to do anything extra.
>
> Now that you mentioned this (I didn't know), is there a need to
> reverse steps r2 and r1? I always build the release from the current
> tag and the version should be clean.
The advantage is that step r1 involves running git-describe, which is
relatively expensive. With the patch I just posted, we only have to
pay that cost when it's really necessary (which is when running stg
directly from a git tree).
> > Both git and we call git-describe with --abbrev=4, which I think
> > means "describe the commit uniquely with as few digits as
> > possible, but no less than four". So we'll get upgraded
> > automatically when it becomes necessary.
>
> OK, I didn't know this either.
I only found out when I wrote the first version patch.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-05-21 14:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 5:19 StGit: kha/{safe,experimental} updated Karl Hasselström
-- strict thread matches above, loose matches on Subject: below --
2008-05-14 1:43 Karl Hasselström
2008-05-19 21:21 ` Catalin Marinas
2008-05-20 7:04 ` Karl Hasselström
2008-05-20 17:19 ` Catalin Marinas
2008-05-20 21:02 ` Karl Hasselström
2008-05-21 14:07 ` Catalin Marinas
2008-05-21 14:58 ` Karl Hasselström
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).