launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01260
[Merge] lp:~allenap/launchpad/format-new-imports into lp:launchpad/devel
Gavin Panella has proposed merging lp:~allenap/launchpad/format-new-imports into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers): code
Very simple little script to format imports in new and modified Python source files.
--
https://code.launchpad.net/~allenap/launchpad/format-new-imports/+merge/36832
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/launchpad/format-new-imports into lp:launchpad/devel.
=== added file 'utilities/format-new-and-modified-imports'
--- utilities/format-new-and-modified-imports 1970-01-01 00:00:00 +0000
+++ utilities/format-new-and-modified-imports 2010-09-28 09:54:51 +0000
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+#
+# Reformat imports in new and modified files. Call without arguments
+# to operate on uncommitted changes. Arguments will be passed to bzr
+# status, so to operate on all new and modified files relative to the
+# submit branch, use:
+#
+# format-new-and-modified-imports -r submit:
+#
+
+bzr status --short "$@" | \
+ awk '/^.[MN] .*[.]py$/ { print $2 }' | \
+ xargs -r "$(dirname "$0")/format-imports"