[PATCH] archimport - update in-script doco, options tidyup
Updated the usage/help message to match asciidoc documentation. The perldoc documentation now includes the first paragraph from the asciidoc documentation and points users to the manpage. Updated TODO section. Removed some redundant options from the getopt() invocation. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
martin@catalyst.net.nz committed
Sep 11, 2005 at 21:26 UTC
241b59675fb9f97531b9d76ae949d61da65c1f3d
1 file changed
+16
-17
git-archimport.perl
+16
-17
@@ -6,23 +6,27 @@
6
# The basic idea is to walk the output of tla abrowse,
7
# fetch the changesets and apply them.
8
#
9
+
10
=head1 Invocation
11
11
- git-archimport -i <archive>/<branch> [<archive>/<branch>]
12
- [ <archive>/<branch> ]
12
+ git-archimport [ -h ] [ -v ] [ -T ] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ]
13
14
- The script expects you to provide the key roots where it can start the
15
- import from an 'initial import' or 'tag' type of Arch commit. It will
16
- then follow all the branching and tagging within the provided roots.
14
+Imports a project from one or more Arch repositories. It will follow branches
15
+and repositories within the namespaces defined by the <archive/branch>
16
+parameters suppplied. If it cannot find the remote branch a merge comes from
17
+it will just import it as a regular commit. If it can find it, it will mark it
18
+as a merge whenever possible.
19
18
- It will die if it sees branches that have different roots.
20
+See man (1) git-archimport for more details.
21
20
-=head2 TODO
22
+=head1 TODO
23
22
- - keep track of merged patches, and mark a git merge when it happens
23
- - smarter rules to parse the archive history "up" and "down"
24
- - be able to continue an import where we left off
24
+ - create tag objects instead of ref tags
25
- audit shell-escaping of filenames
26
+ - better handling of temp directories
27
+ - use GIT_DIR instead of hardcoded ".git"
28
+ - hide our private tags somewhere smarter
29
+ - find a way to make "cat *patches | patch" safe even when patchfiles are missing newlines
30
31
=head1 Devel tricks
32
@@ -54,14 +58,13 @@ our($opt_h,$opt_v, $opt_T,
58
sub usage() {
59
print STDERR <<END;
60
Usage: ${\basename $0} # fetch/update GIT from Arch
57
- [ -h ] [ -v ] [ -T ]
58
- [ -C GIT_repository ] [ -t tempdir ]
61
+ [ -h ] [ -v ] [ -T ] [ -t tempdir ]
62
repository/arch-branch [ repository/arch-branch] ...
63
END
64
exit(1);
65
}
66
64
-getopts("ThviC:t:") or usage();
67
+getopts("Thvt:") or usage();
68
usage if $opt_h;
69
70
@ARGV >= 1 or usage();
@@ -71,10 +74,6 @@ my $tmp = $opt_t;
74
$tmp ||= '/tmp';
75
$tmp .= '/git-archimport/';
76
74
-my $git_tree = $opt_C;
75
-$git_tree ||= ".";
76
-
77
-
77
my @psets = (); # the collection
78
my %psets = (); # the collection, by name
79