1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 08:47:56 +01:00
Commit graph

23 commits

Author SHA1 Message Date
Eric Wong
3ff903bfb9 archimport: remove files from the index before adding/updating
This fixes a bug when importing where a directory gets removed/renamed
but is immediately replaced by a file of the same name in the same
changeset.

This fix only applies to the accurate (default) strategy the moment.

This patch should also fix the fast strategy if/when it is updated
to handle the cases that would've triggered this bug.

This bug was originally found in git-svn, but I remembered I did the
same thing with archimport as well.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 11:21:16 -08:00
Eric Wong
42f4570c86 Documentation/git-archimport: document -o, -a, f, -D options
Also, ensure usage help switches are in the same order.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-19 01:51:16 -08:00
Eric Wong
10945e006a archimport: fix a in new changeset applyer addition
Fix a stupid bug I introduced when splitting the
accurate and fast changeset appliers.

Also, remove an old debugging statement I added

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
6e33101abd archimport: Fix a bug I introduced in the new log parser
This fixes the case (that worked originally in Martin's version)
where the only new/modified files are Arch control files.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
3e525e6738 archimport: Add the accurate changeset applyer
And make it the default.
This includes stats tracking to verbose mode

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
6df896b50a archimport: safer log file parsing
Better logfile parsing, no longer confused by 'headers' after the first
blank line.

Re-enabled tag-reading with abrowse (baz and tla compatible)

Remove need to quote args to external processes

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
42f44b08bc archimport: add -D <depth> and -a switch
add -D <depth> option to abrowse add -a switch to attempt to
auto-register archives at mirrors.sourcecontrol.net

(ML: Also removes some std libraries no longer in use)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
1136fb5284 archimport: remove git wrapper dependency
use git-diff-files instead of git diff-files so we don't rely on the
wrapper being installed (some people may have git as GNU interactive
tools :)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
5744f27794 archimport: fix -t tmpdir switch
set TMPDIR env correctly if -t <tmpdir> is passed from the command-line.
setting TMPDIR => 1 as an argument to tempdir() has no effect otherwise

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:40 +13:00
Eric Wong
f88961a85f archimport: remove String::ShellQuote dependency.
use safe_pipe_capture() or system() over backticks where
shellquoting may have been necessary.
More changes planned, so I'm not touching the parts I'm
planning on replacing entirely.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:39 +13:00
Eric Wong
2777ef76be archimport: first, make sure it still compiles
(ML: And introduce safe_pipe_capture())

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-12-11 14:41:39 +13:00
Martin Langhoff
fee3365fe1 archimport: allow for old style branch and public tag names
This patch adds the -o switch, which lets old trees tracked by
git-archmirror continue working with their old branch and tag names
to make life easier for people tracking your tree.

Private tags that are only used internally by git-archimport continue to be
new-style, and automatically converted upon first run.

[ ml: rebased to skip import overhaul ]

Signed-off-by:: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-11-17 21:20:45 +13:00
Eric Wong
22ff00fc8b Disambiguate the term 'branch' in Arch vs git
Disambiguate the term 'branch' in Arch vs git,
and start using fully-qualified names.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-11-17 20:29:36 +13:00
Eric Wong
9b626e752e archimport: don't die on merge-base failure
Don't die if we can't find a merge base, Arch allows arbitrary
cherry-picks between unrelated branches and we should not
die when that happens

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-11-17 20:29:35 +13:00
Eric Wong
a7fb51d3d4 remove shellquote usage for tags
use ',' to encode '/' in "archivename/foo--bar--0.0" so we can allow
"--branch"-less trees which are valid in Arch ("archivename/foo--0.0")

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
2005-11-17 20:29:35 +13:00
Pavel Roskin
8366a10ab2 symref support for import scripts
Fix git import script not to assume that .git/HEAD is a symlink.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-16 13:19:18 -08:00
Martin Langhoff
f84f9d38eb archimport: handle pika escaping
Arch uses pika escaping in some places (but not all!). Specifically, commits of
the type 'patch' use pika escaping in the log entries, which we parse to know
what to add/delete and what to commit.

This patch checks for hints of pika escaping and asks tla to unescape for us.

Originally implemented by Penny Leach <penny@catalyst.net.nz>

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-11 01:15:26 -08:00
Martin Langhoff
37f15d50c9 [PATCH] archimport: Actually cope with merges from "remote" repositories. Plus: Nicer messages.
archimport was refusing to import commits that had merges from repositories
that it didn't know about. Fixed.

Also brings in nicer messages.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-01 23:14:48 -07:00
martin@catalyst.net.nz
127bf00f7d [PATCH] archimport - better handling of temp dirs
Switched from backwards hard-coded tmp directory creation to using
File::Temp::tempdir() to create the directory inside $TMP_PATH or
what the user has provided via the -t parameter.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-11 10:51:57 -07:00
martin@catalyst.net.nz
1d4710d06c [PATCH] archimport - use GIT_DIR instead of hardcoded ".git"
Use GIT_DIR from the environment instead of a hardcoded '.git' string.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-11 10:51:56 -07:00
martin@catalyst.net.nz
241b59675f [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>
2005-09-11 10:51:54 -07:00
martin@catalyst.net.nz
b779d5f009 [PATCH] archimport - add merge detection
We now keep track of the patches merged in each branch since they have
diverged, using the records that the Arch "logs" provide. Merge parents
for a commit are defined if we are merging a series of patches that starts
from the mergebase.

If patches from a related branch are merged out-of-order, we keep track of
how much has been merged sequentially -- the tip of that sequential merge
is our new parent from that branch.

This mechanism works very well for branches that merge in dovetail and/or
flying fish patterns, probably less well for others.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-10 10:44:21 -07:00
Junio C Hamano
215a7ad1ef Big tool rename.
As promised, this is the "big tool rename" patch.  The primary differences
since 0.99.6 are:

  (1) git-*-script are no more.  The commands installed do not
      have any such suffix so users do not have to remember if
      something is implemented as a shell script or not.

  (2) Many command names with 'cache' in them are renamed with
      'index' if that is what they mean.

There are backward compatibility symblic links so that you and
Porcelains can keep using the old names, but the backward
compatibility support  is expected to be removed in the near
future.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 17:45:20 -07:00
Renamed from git-archimport-script (Browse further)