On date Monday 2009-08-10 11:37:52 +0200, Benjamin Wolsey gnashed:
> Am Montag, den 10.08.2009, 11:27 +0200 schrieb stefasab:
> > On date Saturday 2009-08-08 11:23:31 +0200, stefasab gnashed:
> > > Hi all,
> > > 
> > > I'm doing as an exercise to get more used both to bazaar and also with
> > > the development model followed here.
> > > 
> > > Unfortunately looks like bazaar doesn't support to send patches from a
> > > branch in a format easily reviewable (a la git --format-patch), please
> > > say which is the best way to contribute changes to the project.
> > 
> > Ping?
> > 
> 
> Email bzr diff? bzr send also exists, but I've never used it.

No, unfortunately bzr send (which I used previously) only produces a
patch comprehensive of all changes, rather than one patch per commit.

I found this relevant feature request:
https://bugs.launchpad.net/bzr/+bug/227340

Without this, is *so* much easier for me to use a quilt stack of
patches rather than do bzr branch and commit and bzr diff.

In attachment the patches issued with bzr diff.

Summary:
* 0001-soldumper-avoid-usage-for-ref.patch
  Avoids an ugly forward declaration.

* 0002-soldumper-make-usage-use-ostream.patch
  Extend usage(), so that it takes as parameter an ostream where to put output.

* 0003-soldumper-usage-do-not-exit.patch
  Do not exit explicitly from usage(), since the application may
  return a different error code depending on the context.

* 0004-soldumper-h-print-on-cout.patch
  soldumper -h should print on cout, as the output of the tool, if not
  an error, is supposed to be printed there, so the user can do e.g.:
  soldumper -h | grep foo

* 0005-soldumper-exit-1-in-case-of-invalid-syntax.patch
  A tool should return a non-0 exit code in case of error.

Regards.
=== modified file 'utilities/soldumper.cpp'
--- utilities/soldumper.cpp	2009-04-26 12:12:42 +0000
+++ utilities/soldumper.cpp	2009-08-07 23:10:50 +0000
@@ -63,7 +63,19 @@ namespace boost
 #endif
 
 const char *SOLDUMPER_VERSION = "0.5";
-static void usage ();
+
+/// \brief  Display the command line arguments
+static void
+usage ()
+{
+    cerr << _("This program dumps the internal data of a .sol file")
+         << endl;
+    cerr << _("Usage: soldumper [h] filename") << endl;
+    cerr << _("-h\tHelp") << endl;
+    cerr << _("-f\tForce local directory access") << endl;
+    cerr << _("-l\tList all .sol files in default dir") << endl;
+    exit (-1);
+}
 
 int
 main(int argc, char *argv[])
@@ -193,19 +205,6 @@ main(int argc, char *argv[])
     sol.dump();
 }
 
-/// \brief  Display the command line arguments
-static void
-usage ()
-{
-    cerr << _("This program dumps the internal data of a .sol file")
-         << endl;
-    cerr << _("Usage: soldumper [h] filename") << endl;
-    cerr << _("-h\tHelp") << endl;
-    cerr << _("-f\tForce local directory access") << endl;
-    cerr << _("-l\tList all .sol files in default dir") << endl;
-    exit (-1);
-}
-
 // Local Variables:
 // mode: C++
 // indent-tabs-mode: t

=== modified file 'utilities/soldumper.cpp'
--- utilities/soldumper.cpp	2009-08-07 23:10:50 +0000
+++ utilities/soldumper.cpp	2009-08-07 23:14:40 +0000
@@ -66,14 +66,14 @@ const char *SOLDUMPER_VERSION = "0.5";
 
 /// \brief  Display the command line arguments
 static void
-usage ()
+usage(ostream &o)
 {
-    cerr << _("This program dumps the internal data of a .sol file")
+    o << _("This program dumps the internal data of a .sol file")
          << endl;
-    cerr << _("Usage: soldumper [h] filename") << endl;
-    cerr << _("-h\tHelp") << endl;
-    cerr << _("-f\tForce local directory access") << endl;
-    cerr << _("-l\tList all .sol files in default dir") << endl;
+    o << _("Usage: soldumper [h] filename") << endl;
+    o << _("-h\tHelp") << endl;
+    o << _("-f\tForce local directory access") << endl;
+    o << _("-l\tList all .sol files in default dir") << endl;
     exit (-1);
 }
 
@@ -98,7 +98,7 @@ main(int argc, char *argv[])
     // scan for the two main standard GNU options
     for (c = 0; c < argc; c++) {
       if (strcmp("--help", argv[c]) == 0) {
-        usage();
+        usage(cerr);
         exit(0);
       }
       if (strcmp("--version", argv[c]) == 0) {
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
     while ((c = getopt (argc, argv, "hvfl")) != -1) {
         switch (c) {
           case 'h':
-            usage ();
+            usage(cerr);
             break;
             
 	  case 'v':
@@ -131,7 +131,7 @@ main(int argc, char *argv[])
 	      break;
 
           default:
-            usage ();
+            usage(cerr);
             break;
         }
     }
@@ -140,7 +140,7 @@ main(int argc, char *argv[])
     // If no command line arguments have been supplied, do nothing but
     // print the  usage message.
     if (argc < 2) {
-        usage();
+        usage(cerr);
         exit(0);
     }
 

=== modified file 'utilities/soldumper.cpp'
--- utilities/soldumper.cpp	2009-08-07 23:14:40 +0000
+++ utilities/soldumper.cpp	2009-08-07 23:18:32 +0000
@@ -74,7 +74,6 @@ usage(ostream &o)
     o << _("-h\tHelp") << endl;
     o << _("-f\tForce local directory access") << endl;
     o << _("-l\tList all .sol files in default dir") << endl;
-    exit (-1);
 }
 
 int
@@ -113,6 +112,7 @@ main(int argc, char *argv[])
         switch (c) {
           case 'h':
             usage(cerr);
+	    exit(0);
             break;
             
 	  case 'v':

=== modified file 'utilities/soldumper.cpp'
--- utilities/soldumper.cpp	2009-08-07 23:18:32 +0000
+++ utilities/soldumper.cpp	2009-08-07 23:21:55 +0000
@@ -97,7 +97,7 @@ main(int argc, char *argv[])
     // scan for the two main standard GNU options
     for (c = 0; c < argc; c++) {
       if (strcmp("--help", argv[c]) == 0) {
-        usage(cerr);
+        usage(cout);
         exit(0);
       }
       if (strcmp("--version", argv[c]) == 0) {
@@ -111,7 +111,7 @@ main(int argc, char *argv[])
     while ((c = getopt (argc, argv, "hvfl")) != -1) {
         switch (c) {
           case 'h':
-            usage(cerr);
+            usage(cout);
 	    exit(0);
             break;
             

=== modified file 'utilities/soldumper.cpp'
--- utilities/soldumper.cpp	2009-08-07 23:21:55 +0000
+++ utilities/soldumper.cpp	2009-08-07 23:24:30 +0000
@@ -141,7 +141,7 @@ main(int argc, char *argv[])
     // print the  usage message.
     if (argc < 2) {
         usage(cerr);
-        exit(0);
+        exit(1);
     }
 
     // get the file name from the command line

_______________________________________________
Gnash-dev mailing list
Gnash-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to