summaryrefslogtreecommitdiff
path: root/git-archimport.perl
Commit message (Collapse)AuthorAgeFilesLines
* perl: use "use warnings" instead of -wÆvar Arnfjörð Bjarmason2010-09-271-1/+1
| | | | | | | | | | | | | | | | | | | Change the Perl scripts to turn on lexical warnings instead of setting the global $^W variable via the -w switch. The -w sets warnings for all code that interpreter runs, while "use warnings" is lexically scoped. The former is probably not what the authors wanted. As an auxiliary benefit it's now possible to build Git with: PERL_PATH='/usr/bin/env perl' Which would previously result in failures, since "#!/usr/bin/env perl -w" doesn't work as a shebang. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* perl: bump the required Perl version to 5.8 from 5.6.[21]Ævar Arnfjörð Bjarmason2010-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formalize our dependency on perl 5.8, bumped from 5.6.[12]. We already used the three-arg form of open() which was introduced in 5.6.1, but t/t9700/test.pl explicitly depended on 5.6.2. However git-add--interactive.pl has been failing on the 5.6 line since it was introduced in v1.5.0-rc0~12^2~2 back in 2006 due to this open syntax: sub run_cmd_pipe { my $fh = undef; open($fh, '-|', @_) or die; return <$fh>; } Which when executed dies on "Can't use an undefined value as filehandle reference". Several of our tests also fail on 5.6 (even more when compiled with NO_PERL_MAKEMAKER=1): t2016-checkout-patch.sh t3904-stash-patch.sh t3701-add-interactive.sh t7105-reset-patch.sh t7501-commit.sh t9700-perl-git.sh Our code is bitrotting on 5.6 with no-one interested in fixing it, and pinning us to such an ancient release of Perl is keeping us from using useful features introduced in the 5.8 release. The 5.6 series is now over 10 years old, and the 5.6.2 maintenance release almost 7. 5.8 on the other hand is more than 8 years old. All the modern Unix-like operating systems have now upgraded to it or a later version, and 5.8 packages are available for old IRIX, AIX Solaris and Tru64 systems. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Tor Arntsen <tor@spacetec.no> Acked-by: Randal L. Schwartz <merlyn@stonehenge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make usage strings dash-lessStephan Beyer2008-07-131-2/+2
| | | | | | | | | | | | | | | When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make git-archimport log entries more consistentMiles Bader2007-08-301-1/+5
| | | | | | | | | | | | | When appending the "git-archimport-id:" line to the end of log entries, git-archimport would use two blank lines as a separator when there was no body in the arch log (only a Summary: line), and zero blank lines when there was a body (making it hard to see the break between the actual log message and the git-archimport-id: line). This patch makes git-archimport generate one blank line as a separator in all cases. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* War on whitespaceJunio C Hamano2007-06-071-88/+87
| | | | | | | | | This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-archimport: allow remapping branch namesPaolo Bonzini2007-03-071-22/+64
| | | | | | | | | | | | | | | | | | This patch adds support to archimport for remapping the branch names to match those used in git more closely. This is useful for projects that migrate to git (as opposed to users that want to use git on Arch-based projects). For example, one can choose an Arch branch name and call it "master". The new command-line syntax works even if there is a colon in a branch name, since only the part after the last colon is taken to be the git name (git does not allow colons in branch names). The new feature is implemented so that archives rotated every year can also be remapped into a single git archive. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-archimport: support empty summaries, put summary on a single line.Paolo Bonzini2007-02-281-4/+15
| | | | | | | | Don't fail if the summary line in an arch commit is empty. In this case, try to use the first line in the commit message followed by an ellipsis. In addition, if the summary is multi-line, it is joined on a single line. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-archimport: initial import needs empty directoryGerrit Pape2007-02-041-0/+9
| | | | | | | | | | git-archimport should better refuse to start an initial import if the current directory is not empty. (http://bugs.debian.org/400508) Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* use 'init' instead of 'init-db' for shipped docs and toolsNicolas Pitre2007-01-121-1/+1
| | | | | | | | | While 'init-db' still is and probably will always remain a valid git command for obvious backward compatibility reasons, it would be a good idea to move shipped tools and docs to using 'init' instead. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix more typos, primarily in the codePavel Roskin2006-07-101-4/+4
| | | | | | | | | The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Rip out merge-order and make "git log <paths>..." work again.Linus Torvalds2006-03-011-2/+2
| | | | | | | | | | | | | | Well, assuming breaking --merge-order is fine, here's a patch (on top of the other ones) that makes git log <filename> actually work, as far as I can tell. I didn't add the logic for --before/--after flags, but that should be pretty trivial, and is independent of this anyway. Signed-off-by: Junio C Hamano <junkio@cox.net>
* archimport: remove files from the index before adding/updatingEric Wong2006-02-181-15/+13
| | | | | | | | | | | | | | | | | 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>
* Documentation/git-archimport: document -o, -a, f, -D optionsEric Wong2005-12-191-2/+3
| | | | | | | 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>
* archimport: fix a in new changeset applyer additionEric Wong2005-12-111-5/+1
| | | | | | | | | | 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>
* archimport: Fix a bug I introduced in the new log parserEric Wong2005-12-111-2/+2
| | | | | | | | 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>
* archimport: Add the accurate changeset applyerEric Wong2005-12-111-28/+171
| | | | | | | | 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>
* archimport: safer log file parsingEric Wong2005-12-111-98/+111
| | | | | | | | | | | | 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>
* archimport: add -D <depth> and -a switchEric Wong2005-12-111-90/+135
| | | | | | | | | | 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>
* archimport: remove git wrapper dependencyEric Wong2005-12-111-1/+1
| | | | | | | | | 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>
* archimport: fix -t tmpdir switchEric Wong2005-12-111-3/+2
| | | | | | | | 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>
* archimport: remove String::ShellQuote dependency.Eric Wong2005-12-111-23/+28
| | | | | | | | | | 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>
* archimport: first, make sure it still compilesEric Wong2005-12-111-0/+16
| | | | | | | (ML: And introduce safe_pipe_capture()) Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
* archimport: allow for old style branch and public tag namesMartin Langhoff2005-11-171-6/+17
| | | | | | | | | | | | | | 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>
* Disambiguate the term 'branch' in Arch vs gitEric Wong2005-11-171-11/+54
| | | | | | | | 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>
* archimport: don't die on merge-base failureEric Wong2005-11-171-1/+7
| | | | | | | | | 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>
* remove shellquote usage for tagsEric Wong2005-11-171-27/+28
| | | | | | | | 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>
* symref support for import scriptsPavel Roskin2005-11-161-2/+1
| | | | | | | 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>
* archimport: handle pika escapingMartin Langhoff2005-11-111-0/+5
| | | | | | | | | | | | | 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>
* [PATCH] archimport: Actually cope with merges from "remote" repositories. ↵Martin Langhoff2005-10-011-1/+7
| | | | | | | | | | | | 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>
* [PATCH] archimport - better handling of temp dirsmartin@catalyst.net.nz2005-09-111-5/+5
| | | | | | | | | 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>
* [PATCH] archimport - use GIT_DIR instead of hardcoded ".git"martin@catalyst.net.nz2005-09-111-20/+22
| | | | | | | 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>
* [PATCH] archimport - update in-script doco, options tidyupmartin@catalyst.net.nz2005-09-111-17/+16
| | | | | | | | | | | | | 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>
* [PATCH] archimport - add merge detectionmartin@catalyst.net.nz2005-09-101-4/+180
| | | | | | | | | | | | | | | | | 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>
* Big tool rename.Junio C Hamano2005-09-071-0/+604
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>