threads / patch / 1769

patch, 5 partsarchimport - update in-script doco, options tidyup

Subject: [PATCH 3/5] archimport - update in-script doco, options tidyup

## tl;dr

2 messages between Sep 11, 2005 and Sep 11, 2005. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

martin@catalyst.net.nz· Sep 11, 2005, 09:26 UTC · lore

[PATCH 2/5] archimport documentation tidyup

New "merges" headline, clarified some parts that were not easy to understand.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
---
 Documentation/git-archimport.txt |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
da341e8530b0d852c9b6910778df6b41cdee3e54
Show changes to Documentation/git-archimport.txt +5 −4
diff --git a/Documentation/git-archimport.txt b/Documentation/git-archimport.txt
--- a/Documentation/git-archimport.txt
+++ b/Documentation/git-archimport.txt
@@ -3,7 +3,7 @@ git-archimport(1)
 
 NAME
 ----
-git-archimport - Import an arch repository into git
+git-archimport - Import an Arch repository into GIT
 
 
 SYNOPSIS
@@ -16,8 +16,8 @@ DESCRIPTION
 Imports a project from one or more Arch repositories. It will follow branches
 and repositories within the namespaces defined by the <archive/branch>
 parameters suppplied. If it cannot find the remote branch a merge comes from
-it will just import it as a regular merge. If it can find it, it will perform
-a merge whenever possible. 
+it will just import it as a regular commit. If it can find it, it will mark it 
+as a merge whenever possible (see discussion below). 
 
 The script expects you to provide the key roots where it can start the import 
 from an 'initial import' or 'tag' type of Arch commit. It will follow and import 
@@ -34,8 +34,9 @@ know about the repositories you pass to 
 For the initial import `git-archimport` expects to find itself in an empty 
 directory. To follow the development of a project that uses Arch, rerun 
 `git-archimport` with the same parameters as the initial import to perform incremental imports.
-of a project using Arch.
 
+MERGES
+------
 Patch merge data from Arch is used to mark merges in GIT as well. GIT 
 does not care much about tracking patches, and only considers a merge when a
 branch incorporates all the commits since the point they forked. The end result
martin@catalyst.net.nz· Sep 11, 2005, 09:26 UTC · re: martin@catalyst.net.nz · lore

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>
---
 git-archimport.perl |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)
8d625fb42f58a6b4b2af135efe76726e8f0579e0
Show changes to git-archimport.perl +16 −17
diff --git a/git-archimport.perl b/git-archimport.perl
--- a/git-archimport.perl
+++ b/git-archimport.perl
@@ -6,23 +6,27 @@
 # The basic idea is to walk the output of tla abrowse, 
 # fetch the changesets and apply them. 
 #
+
 =head1 Invocation
 
-    git-archimport -i <archive>/<branch> [<archive>/<branch>]
-    [ <archive>/<branch> ]
+    git-archimport [ -h ] [ -v ] [ -T ] [ -t tempdir ] <archive>/<branch> [ <archive>/<branch> ]
 
-    The script expects you to provide the key roots where it can start the
-    import from an 'initial import' or 'tag' type of Arch commit. It will
-    then follow all the branching and tagging within the provided roots.
+Imports a project from one or more Arch repositories. It will follow branches
+and repositories within the namespaces defined by the <archive/branch>
+parameters suppplied. If it cannot find the remote branch a merge comes from
+it will just import it as a regular commit. If it can find it, it will mark it 
+as a merge whenever possible.
 
-    It will die if it sees branches that have different roots. 
+See man (1) git-archimport for more details.
 
-=head2 TODO
+=head1 TODO
 
- - keep track of merged patches, and mark a git merge when it happens
- - smarter rules to parse the archive history "up" and "down"
- - be able to continue an import where we left off
+ - create tag objects instead of ref tags
  - audit shell-escaping of filenames
+ - better handling of temp directories
+ - use GIT_DIR instead of hardcoded ".git"
+ - hide our private tags somewhere smarter
+ - find a way to make "cat *patches | patch" safe even when patchfiles are missing newlines  
 
 =head1 Devel tricks
 
@@ -54,14 +58,13 @@ our($opt_h,$opt_v, $opt_T,
 sub usage() {
     print STDERR <<END;
 Usage: ${\basename $0}     # fetch/update GIT from Arch
-       [ -h ] [ -v ] [ -T ] 
-       [ -C GIT_repository ] [ -t tempdir ] 
+       [ -h ] [ -v ] [ -T ] [ -t tempdir ] 
        repository/arch-branch [ repository/arch-branch] ...
 END
     exit(1);
 }
 
-getopts("ThviC:t:") or usage();
+getopts("Thvt:") or usage();
 usage if $opt_h;
 
 @ARGV >= 1 or usage();
@@ -71,10 +74,6 @@ my $tmp = $opt_t;
 $tmp ||= '/tmp';
 $tmp .= '/git-archimport/';
 
-my $git_tree = $opt_C;
-$git_tree ||= ".";
-
-
 my @psets  = ();                # the collection
 my %psets  = ();                # the collection, by name
 

← back to recent threads