From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: git@vger.kernel.org
Subject: [StGIT PATCH 1/3] Command to move a patch to the top
Date: Tue, 03 Oct 2006 23:34:53 +0200 [thread overview]
Message-ID: <20061003213453.26195.54830.stgit@lathund.dewire.com> (raw)
From: Robin Rosenberg <robin.rosenberg@dewire.com>
---
stgit/main.py | 3 +++
t/t1500-float.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/stgit/main.py b/stgit/main.py
index f59bce6..e9cc6cd 100644
--- a/stgit/main.py
+++ b/stgit/main.py
@@ -38,6 +38,7 @@ import stgit.commands.clone
import stgit.commands.commit
import stgit.commands.export
import stgit.commands.files
+import stgit.commands.float
import stgit.commands.fold
import stgit.commands.goto
import stgit.commands.id
@@ -77,6 +78,7 @@ commands = {
'commit': stgit.commands.commit,
'export': stgit.commands.export,
'files': stgit.commands.files,
+ 'float': stgit.commands.float,
'fold': stgit.commands.fold,
'goto': stgit.commands.goto,
'id': stgit.commands.id,
@@ -113,6 +115,7 @@ stackcommands = (
'applied',
'clean',
'commit',
+ 'float',
'goto',
'init',
'pop',
diff --git a/t/t1500-float.sh b/t/t1500-float.sh
new file mode 100755
index 0000000..670050f
--- /dev/null
+++ b/t/t1500-float.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Robin Rosenberg
+#
+
+test_description='Test floating a number of patches to the top of the stack
+
+'
+
+. ./test-lib.sh
+
+test_expect_success \
+ 'Initialize the StGIT repository' \
+ 'stg init &&
+ stg new A -m "a" && echo A >a.txt && stg add a.txt && stg refresh &&
+ stg new B -m "b" && echo B >b.txt && stg add b.txt && stg refresh &&
+ stg new C -m "c" && echo C >c.txt && stg add c.txt && stg refresh &&
+ stg new D -m "d" && echo D >d.txt && stg add d.txt && stg refresh &&
+ stg new E -m "e" && echo E >e.txt && stg add e.txt && stg refresh &&
+ stg new F -m "f" && echo F >f.txt && stg add f.txt && stg refresh &&
+ test "`echo \`cat .git/patches/master/applied\``" = "A B C D E F"
+ '
+
+test_expect_success \
+ 'Float A to top' \
+ 'stg float A &&
+ test "`echo \`cat .git/patches/master/applied\``" = "B C D E F A"
+ '
+test_expect_success \
+ 'Float A to top (noop)' \
+ 'stg float A &&
+ test "`echo \`cat .git/patches/master/applied\``" = "B C D E F A"
+ '
+test_expect_success \
+ 'Float B C to top (noop)' \
+ 'stg float B C &&
+ test "`echo \`cat .git/patches/master/applied\``" = "D E F A B C"
+ '
+test_expect_success \
+ 'Float E A to top (noop)' \
+ 'stg float E A &&
+ test "`echo \`cat .git/patches/master/applied\``" = "D F B C E A"
+ '
+test_done
next reply other threads:[~2006-10-03 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 21:34 Robin Rosenberg [this message]
2006-10-03 21:34 ` [StGIT PATCH 2/3] Add an optional prefix to the PATCH subject when mailing Robin Rosenberg
2006-10-03 21:34 ` [StGIT PATCH 3/3] Fix the --cover option Robin Rosenberg
2006-10-05 21:09 ` [StGIT PATCH] (Repost) Command to move a patch to the top Robin Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061003213453.26195.54830.stgit@lathund.dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).