git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add a guilt-export(1) command to export a guilt series to quilt.
@ 2007-06-13 14:01 Pierre Habouzit
  2007-06-13 15:10 ` Benjamin Sergeant
  2007-06-13 15:51 ` Josef Sipek
  0 siblings, 2 replies; 6+ messages in thread
From: Pierre Habouzit @ 2007-06-13 14:01 UTC (permalink / raw)
  To: Josef Jeff Sipek; +Cc: git, Pierre Habouzit

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 Documentation/guilt-export.txt |   30 ++++++++++++++++++++++++++++++
 guilt-export                   |   26 ++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/guilt-export.txt
 create mode 100755 guilt-export

diff --git a/Documentation/guilt-export.txt b/Documentation/guilt-export.txt
new file mode 100644
index 0000000..b7b0a4b
--- /dev/null
+++ b/Documentation/guilt-export.txt
@@ -0,0 +1,30 @@
+guilt-export(1)
+===============
+
+NAME
+----
+guilt-export - Export a patch series (to be used by quilt)
+
+SYNOPSIS
+--------
+include::usage-guilt-export.txt[]
+
+DESCRIPTION
+-----------
+Export a guilt series to be used by quilt.
+
+OPTIONS
+-------
+<target_dir>::
+        Name of the directory to export the patch series to.
+        (defaults to patches).
+
+Author
+------
+Written by Pierre Habouzit <madcoder@debian.org>
+
+Documentation
+-------------
+Documentation by Pierre Habouzit <madcoder@debian.org>
+
+include::footer.txt[]
diff --git a/guilt-export b/guilt-export
new file mode 100755
index 0000000..9ff9924
--- /dev/null
+++ b/guilt-export
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Copyright (c) Pierre Habouzit, 2007
+#
+
+USAGE="[<target_dir>]"
+. guilt
+
+if [ $# -gt 1 ]; then
+	usage
+fi
+target_dir=${1:-"patches"}
+
+if [ -e "$target_dir" ]; then
+	die "Specified directory already exists"
+fi
+
+trap "rm -rf \"$target_dir\"" 0
+mkdir -p "$target_dir"
+
+get_series | tee "$target_dir/series" | while read p; do
+	cp "$GUILT_DIR/$branch/$p" "$target_dir/$p"
+done
+
+trap - 0
+echo "Series exported to \"$target_dir\" sucessfully."
-- 
1.5.2.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add a guilt-export(1) command to export a guilt series to quilt.
  2007-06-13 14:01 [PATCH] Add a guilt-export(1) command to export a guilt series to quilt Pierre Habouzit
@ 2007-06-13 15:10 ` Benjamin Sergeant
  2007-06-13 15:16   ` Pierre Habouzit
  2007-06-13 15:54   ` Josef Sipek
  2007-06-13 15:51 ` Josef Sipek
  1 sibling, 2 replies; 6+ messages in thread
From: Benjamin Sergeant @ 2007-06-13 15:10 UTC (permalink / raw)
  To: Pierre Habouzit; +Cc: Josef Jeff Sipek, git

For the shebang:
#!/usr/bin/env bash
should works well and should work on non-linux boxes that did not
added a link in /bin/bash.

My 2 cents.

On 6/13/07, Pierre Habouzit <madcoder@debian.org> wrote:
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> ---
>  Documentation/guilt-export.txt |   30 ++++++++++++++++++++++++++++++
>  guilt-export                   |   26 ++++++++++++++++++++++++++
>  2 files changed, 56 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/guilt-export.txt
>  create mode 100755 guilt-export
>
> diff --git a/Documentation/guilt-export.txt b/Documentation/guilt-export.txt
> new file mode 100644
> index 0000000..b7b0a4b
> --- /dev/null
> +++ b/Documentation/guilt-export.txt
> @@ -0,0 +1,30 @@
> +guilt-export(1)
> +===============
> +
> +NAME
> +----
> +guilt-export - Export a patch series (to be used by quilt)
> +
> +SYNOPSIS
> +--------
> +include::usage-guilt-export.txt[]
> +
> +DESCRIPTION
> +-----------
> +Export a guilt series to be used by quilt.
> +
> +OPTIONS
> +-------
> +<target_dir>::
> +        Name of the directory to export the patch series to.
> +        (defaults to patches).
> +
> +Author
> +------
> +Written by Pierre Habouzit <madcoder@debian.org>
> +
> +Documentation
> +-------------
> +Documentation by Pierre Habouzit <madcoder@debian.org>
> +
> +include::footer.txt[]
> diff --git a/guilt-export b/guilt-export
> new file mode 100755
> index 0000000..9ff9924
> --- /dev/null
> +++ b/guilt-export
> @@ -0,0 +1,26 @@
> +#!/bin/bash
> +#
> +# Copyright (c) Pierre Habouzit, 2007
> +#
> +
> +USAGE="[<target_dir>]"
> +. guilt
> +
> +if [ $# -gt 1 ]; then
> +       usage
> +fi
> +target_dir=${1:-"patches"}
> +
> +if [ -e "$target_dir" ]; then
> +       die "Specified directory already exists"
> +fi
> +
> +trap "rm -rf \"$target_dir\"" 0
> +mkdir -p "$target_dir"
> +
> +get_series | tee "$target_dir/series" | while read p; do
> +       cp "$GUILT_DIR/$branch/$p" "$target_dir/$p"
> +done
> +
> +trap - 0
> +echo "Series exported to \"$target_dir\" sucessfully."
> --
> 1.5.2.1
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add a guilt-export(1) command to export a guilt series to quilt.
  2007-06-13 15:10 ` Benjamin Sergeant
@ 2007-06-13 15:16   ` Pierre Habouzit
  2007-06-13 15:54   ` Josef Sipek
  1 sibling, 0 replies; 6+ messages in thread
From: Pierre Habouzit @ 2007-06-13 15:16 UTC (permalink / raw)
  To: Benjamin Sergeant; +Cc: Josef Jeff Sipek, git

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Wed, Jun 13, 2007 at 08:10:36AM -0700, Benjamin Sergeant wrote:
> For the shebang:
> #!/usr/bin/env bash
> should works well and should work on non-linux boxes that did not
> added a link in /bin/bash.

  FWIW it would spawn a process for nothin, and every other guilt
command uses that. People using it on non linux box would have to run a
sed on every shebang at install time, that's not _that_ hard anyways,
and is common practice with python or perl scripts e.g. IMHO it's not a
problem.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add a guilt-export(1) command to export a guilt series to quilt.
  2007-06-13 14:01 [PATCH] Add a guilt-export(1) command to export a guilt series to quilt Pierre Habouzit
  2007-06-13 15:10 ` Benjamin Sergeant
@ 2007-06-13 15:51 ` Josef Sipek
  1 sibling, 0 replies; 6+ messages in thread
From: Josef Sipek @ 2007-06-13 15:51 UTC (permalink / raw)
  To: Pierre Habouzit; +Cc: git

On Wed, Jun 13, 2007 at 04:01:53PM +0200, Pierre Habouzit wrote:
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> ---
>  Documentation/guilt-export.txt |   30 ++++++++++++++++++++++++++++++
>  guilt-export                   |   26 ++++++++++++++++++++++++++
>  2 files changed, 56 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/guilt-export.txt
>  create mode 100755 guilt-export

Applied.

Thanks.

Josef "Jeff" Sipek.

-- 
Computer Science is no more about computers than astronomy is about
telescopes.
		- Edsger Dijkstra

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add a guilt-export(1) command to export a guilt series to quilt.
  2007-06-13 15:10 ` Benjamin Sergeant
  2007-06-13 15:16   ` Pierre Habouzit
@ 2007-06-13 15:54   ` Josef Sipek
  2007-06-14 10:38     ` Pierre Habouzit
  1 sibling, 1 reply; 6+ messages in thread
From: Josef Sipek @ 2007-06-13 15:54 UTC (permalink / raw)
  To: Benjamin Sergeant; +Cc: Pierre Habouzit, git

On Wed, Jun 13, 2007 at 08:10:36AM -0700, Benjamin Sergeant wrote:
> For the shebang:
> #!/usr/bin/env bash
> should works well and should work on non-linux boxes that did not
> added a link in /bin/bash.
 
Ideally, the best thing to do is to change guilt to use /bin/sh. Right now,
there are a number of bash-isms that are used. And if a system doesn't have
/bin/sh, it doesn't deserve to run any useful software ;)

Patches are welcomed ;)

Josef "Jeff" Sipek.

-- 
Reality is merely an illusion, albeit a very persistent one.
		- Albert Einstein

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add a guilt-export(1) command to export a guilt series to quilt.
  2007-06-13 15:54   ` Josef Sipek
@ 2007-06-14 10:38     ` Pierre Habouzit
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre Habouzit @ 2007-06-14 10:38 UTC (permalink / raw)
  To: Josef Sipek; +Cc: Benjamin Sergeant, git

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

On Wed, Jun 13, 2007 at 11:54:54AM -0400, Josef Sipek wrote:
> On Wed, Jun 13, 2007 at 08:10:36AM -0700, Benjamin Sergeant wrote:
> > For the shebang:
> > #!/usr/bin/env bash
> > should works well and should work on non-linux boxes that did not
> > added a link in /bin/bash.
>  
> Ideally, the best thing to do is to change guilt to use /bin/sh. Right now,
> there are a number of bash-isms that are used. And if a system doesn't have
> /bin/sh, it doesn't deserve to run any useful software ;)
> 
> Patches are welcomed ;)

  Makes sense. I'm currently working on it (so that nobody loses time on
that issue).

  I'm mostly done with guilt(1), I still need to take some "local"
variables down (especially in guilt_push or whatever the function name
is). Most of the rest has been dealt with already.


  I should send a patch serie towards POSIX-shell-isation soon, as soon
as I've tested the patches with bash, zsh, dash and posh.

  Cheers,
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-14 10:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13 14:01 [PATCH] Add a guilt-export(1) command to export a guilt series to quilt Pierre Habouzit
2007-06-13 15:10 ` Benjamin Sergeant
2007-06-13 15:16   ` Pierre Habouzit
2007-06-13 15:54   ` Josef Sipek
2007-06-14 10:38     ` Pierre Habouzit
2007-06-13 15:51 ` Josef Sipek

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).