summaryrefslogtreecommitdiff
path: root/git-svn.perl
AgeCommit message (Collapse)AuthorFilesLines
2012-08-10git svn: handle errors and concurrent commits in dcommitLibravatar Robert Luberda1-19/+55
dcommit didn't handle errors returned by SVN and coped very poorly with concurrent commits that appear in SVN repository while dcommit was running. In both cases it left git repository in inconsistent state: index (which was reset with `git reset --mixed' after a successful commit to SVN) no longer matched the checkouted tree, when the following commit failed or needed to be rebased. See http://bugs.debian.org/676904 for examples. This patch fixes the issues by: - introducing error handler for dcommit. The handler will try to rebase or reset working tree before returning error to the end user. dcommit_rebase function was extracted out of cmd_dcommit to ensure consistency between cmd_dcommit and the error handler. - calling `git reset --mixed' only once after all patches are successfully committed to SVN. This ensures index is not touched for most of the time of dcommit run. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract Git::SVN::GlobSpec from git-svn.Libravatar Michael G. Schwern1-59/+0
Straight cut & paste. That's the last class. * Make Git::SVN load it on its own, its the only thing that needs it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Move Git::IndexInfo into its own file.Libravatar Michael G. Schwern1-32/+0
Straight cut & paste. Didn't require any fixing. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Load all the modules in one place and before running code.Libravatar Michael G. Schwern1-23/+21
Just makes the code easier to follow. No functional change. Also eliminate an unused lexical $SVN. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract Git::SVN::Migration from git-svn.Libravatar Michael G. Schwern1-257/+1
Straight cut & paste. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Prepare Git::SVN::Migration for extraction from git-svn.Libravatar Michael G. Schwern1-12/+24
* Load Git command functions on its own. * Load Git::SVN modules on its own. Drive by refactorings... * Use our() instead of use vars. * Eliminate the auto loading of Git functions. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract Git::SVN::Log from git-svn.Libravatar Michael G. Schwern1-394/+1
Straight cut & paste. Also noticed Git::SVN::Ra wasn't in the compile test. It is now. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Prepare Git::SVN::Log for extraction from git-svn.Libravatar Michael G. Schwern1-4/+11
* Load Git command functions itself. * Can't access the git-svn switch lexical any more, but its only used by Git::SVN::Log so turn it into a Git::SVN::Log global. * Load Git::SVN as needed. No need to load it always, its only used twice. * Moved a state variable to the routine it's used for. (Drive by refactoring) Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Move initialization of Git::SVN variables into Git::SVN.Libravatar Michael G. Schwern1-4/+0
Also it can compile on its own now, yay! Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract Git::SVN from git-svn into its own .pm file.Libravatar Michael G. Schwern1-2319/+1
Except for adding the 1; at the end, this is a straight copy & paste. Tests still pass, but its doubtful Git::SVN will compile on its own without git-svn being loaded. Next commit will fix that. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Prepare Git::SVN for extraction into its own file.Libravatar Michael G. Schwern1-4/+18
This means it should be able to load without git-svn being loaded. * Load Git.pm on its own and all the needed command functions. * It needs to grab at a git-svn lexical $_prefix representing the --prefix option. Provide opt_prefix() for that. This is a refactoring artifact. The prefix should really be passed into Git::SVN->new. * Unqualify unnecessarily fully qualified globals like $Git::SVN::default_repo_id. * Lexically isolate the class just to make sure nothing is leaking out. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27Extract some utilities from git-svn to allow extracting Git::SVN.Libravatar Michael G. Schwern1-15/+19
Put them in a new module called Git::SVN::Utils. Yeah, not terribly original and it will be a dumping ground. But its better than having them in the main git-svn program. At least they can be documented and tested. * fatal() is used by many classes. * Change the $can_compress lexical into a function. This should be enough to extract Git::SVN. Signed-off-by: Michael G. Schwern <schwern@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-19git-svn: don't create master if another head existsLibravatar Marcin Owsiany1-5/+4
git-svn insists on creating the "master" head (unless it exists) on every "fetch". It is useful that it gets created initially, when no head exists - users expect this git convention of having a "master" branch on initial clone. However creating it when there already is another head does not provide any value - the ref is never updated, so it just gets stale after a while. Also, some users find it annoying that it gets recreated, especially when they would like the git branch names to follow SVN repository branch names. More background in http://thread.gmane.org/gmane.comp.version-control.git/115030 Make git-svn skip the "master" creation if HEAD already points at a valid head. This means "master" does get created on initial "clone" but does not get recreated once a user deletes it. Also, make post_fetch_checkout work with any head that is pointed to by HEAD, not just "master". Also, use fatal error handling consistent with the rest of the program for post_fetch_checkout. Signed-off-by: Marcin Owsiany <marcin@owsiany.pl> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-06-10git-svn: use YAML format for mergeinfo cache when possibleLibravatar Jonathan Nieder1-6/+25
Since v1.7.0-rc2~11 (git-svn: persistent memoization, 2010-01-30), git-svn has maintained some private per-repository caches in .git/svn/.caches to avoid refetching and recalculating some mergeinfo-related information with every "git svn fetch". These caches use the 'nstore' format from the perl core module Storable, which can be read and written quickly and was designed for transfer over the wire (the 'n' stands for 'network'). This format is endianness-independent and independent of floating-point representation. Unfortunately the format is *not* independent of the perl version --- new perl versions will write files that very old perl cannot read. Worse, the format is not independent of the size of a perl integer. So if you toggle perl's use64bitint compile-time option, then using 'git svn fetch' on your old repositories produces errors like this: Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at /usr/share/perl/5.12/Memoize/Storable.pm line 21 That is, upgrading perl to a version that uses use64bitint for the first time makes git-svn suddenly refuse to fetch in existing repositories. Removing .git/svn/.caches lets git-svn recover. It's time to switch to a platform independent serializer backend with better compatibility guarantees. This patch uses YAML::Any. Other choices were considered: - thawing data from Data::Dumper involves "eval". Doing that without creating a security risk is fussy. - the JSON API works on scalars in memory and doesn't provide a standard way to serialize straight to disk. YAML::Any is reasonably fast and has a pleasant API. In most backends, LoadFile() reads the entire file into a scalar anyway and converts it as a second step, but having an interface that allows the deserialization to happen on the fly without a temporary is still a comfort. YAML::Any is not a core perl module, so we take care to use it when and only when it is available. Installations without that module should fall back to using Storable with all its quirks, keeping their cache files in .git/svn/.caches/*.db Installations with YAML peacefully coexist by keeping a separate set of cache files in .git/svn/.caches/*.yaml. In most cases, switching between is a one-time thing, so it doesn't seem worth the complication to migrate existing caches. The upshot: after this patch, as long as YAML::Any is installed you can move your git repository between machines with different perl installations and "git svn fetch" will work fine. If you do not have YAML::Any, the behavior is unchanged (and in particular does not get any worse). Reported-by: Sandro Weiser <sandro.weiser@informatik.tu-chemnitz.de> Reported-by: Bdale Garbee <bdale@gag.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-06-10git-svn: make Git::SVN::RA a separate fileLibravatar Jonathan Nieder1-611/+1
This slices off another 600 or so lines from the frighteningly long git-svn.perl script. The Git::SVN::Ra interface is similar enough to SVN::Ra that it is probably safe to ignore most of its implementation on first reading. (Documenting or moving functions that do not fit that pattern is left as an exercise to the interested reader.) [ew: rebased and fixed conflict against commit c26ddce86d7215b4d9687bd4c6b5dd43a3fabf31 (git-svn: platform auth providers are working only on 1.6.15 or newer)] Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-06-10git-svn: make Git::SVN::Editor a separate fileLibravatar Jonathan Nieder1-470/+2
This makes the git-svn script shorter and less scary for beginners to read through for the first time. Take the opportunity to explain the purpose and basic interface of the Git::SVN::Editor class while at it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-06-07Merge branch 'jc/svn-auth-providers-unusable-at-1.6.12'Libravatar Junio C Hamano1-1/+1
Regression fix for people with libsvn between 1.6.12 and 1.6.15, on which we tried to use the non-working platform auth providers. * jc/svn-auth-providers-unusable-at-1.6.12: git-svn: platform auth providers are working only on 1.6.15 or newer
2012-06-04git-svn: platform auth providers are working only on 1.6.15 or newerLibravatar Junio C Hamano1-1/+1
Matthijs Kooijman reports that the cut-off point 082afee (git-svn: use platform specific auth providers, 2012-04-26) set at 1.6.12 to use this feature safely was incorrect, and it is 1.6.15 instead: http://svn.apache.org/repos/asf/subversion/trunk/CHANGES Version 1.6.15 * improve some swig parameter mapping (r984565, r1035745) Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-05-29git-svn: make Git::SVN::Fetcher a separate fileLibravatar Jonathan Nieder1-505/+2
This patch removes a chunk of code (the Git::SVN::Fetcher consumer of libsvn's tree delta protocol) from git-svn.perl and documents its interface so the hurried reader does not have to read that code right away. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-29git-svn: rename SVN::Git::* packages to Git::SVN::*Libravatar Jonathan Nieder1-25/+25
Using names in the Git:: namespace means these cannot conflict with a hypothetical binding teaching Subversion to interact with git repositories. Currently the packages are private to git-svn.perl so the choice of name isn't likely to make much difference. This change is mainly meant as preparation for splitting out the packages in question as modules on the public search path. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-29git-svn: move Git::SVN::Prompt into its own fileLibravatar Jonathan Nieder1-144/+1
git-svn.perl is very long (around 6500 lines) and although it is nicely split into modules, some new readers do not even notice --- it is too distracting to see all this functionality collected in a single file. Splitting it into multiple files would make it easier for people to read individual modules straight through and to experiment with components separately. Let's start with Git::SVN::Prompt. For simplicity, we install this as a module in the standard search path, just like the existing Git and Git::I18N modules. In the process, add a manpage explaining its interface and that it is not likely to be useful for other projects to avoid confusion. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-16git-svn: support rebase --preserve-mergesLibravatar Avishay Lavie1-1/+3
When git svn rebase is performed after an unpushed merge, the rebase operation follows both parents and replays both the user's local commits and those from the merged branch. This is usually not the intended behavior. This patch adds support for the --preserve-merges/-p flag which allows for a better workflow by re-applying merge commits as merges. [ew: fixed a minor syntax error] Signed-off-by: Avishay Lavie <avishay.lavie@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-02Merge branch 'master' of git://git.bogomips.org/git-svnLibravatar Junio C Hamano1-7/+25
via Eric Wong * 'master' of git://git.bogomips.org/git-svn: git-svn: introduce SVN version comparison function
2012-05-02Merge branch 'jk/maint-gitweb-test-use-sane-perl'Libravatar Junio C Hamano1-1/+1
When using a Perl script on a system where "perl" found on user's $PATH could be ancient or otherwise broken, we allow builders to specify the path to a good copy of Perl with $PERL_PATH. The gitweb test forgot to use that Perl when running its test. By Jeff King (1) and Zbigniew Jędrzejewski-Szmek (1) * jk/maint-gitweb-test-use-sane-perl: Consistently use perl from /usr/bin/ for scripts t/gitweb-lib: use $PERL_PATH to run gitweb
2012-05-02git-svn: introduce SVN version comparison functionLibravatar Junio C Hamano1-7/+25
With double-digit version components in SVN::Core::VERSION, a naive string comparison is no longer sufficient and a numeric comparison is required for correct results. This fixes a regression introduced in commit 082afee621aeb2d3746c8ae290af98823f981f34 ("git-svn: use platform specific auth providers") where SVN version "1.6.6" was incorrectly assumed to be newer than the required "1.6.12" version. [mk: fix namespace references] [ew: commit message] Tested-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-01Consistently use perl from /usr/bin/ for scriptsLibravatar Zbigniew Jędrzejewski-Szmek1-1/+1
While the majority of scripts use '#!/usr/bin/perl', some use '#!/usr/bin/env perl'. In the end there is no difference, because the Makefile rewrites "#!.*perl" with "#!$PERL_PATH" in scripted Porcelains before installing. Nevertheless, the second form can be misleading, because it suggests that perl found first in $PATH will be used. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-27git-svn: use platform specific auth providersLibravatar Matthijs Kooijman1-2/+18
On Linux, this makes authentication using passwords from gnome-keyring and kwallet work (only the former was tested). On Mac OS X, this allows using the OS X Keychain. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-04-24git-svn: drop redundant blocking of SIGPIPELibravatar Roman Kagan1-1/+1
Now that SIGPIPE is ignored there's no point blocking it. Signed-off-by: Roman Kagan <rkagan@mail.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-04-24git-svn: ignore SIGPIPELibravatar Roman Kagan1-0/+5
In HTTP with keep-alive it's not uncommon for the client to notice that the server decided to stop maintaining the current connection only when sending a new request. This naturally results in -EPIPE and possibly SIGPIPE. The subversion library itself makes no provision for SIGPIPE. Some combinations of the underlying libraries do (typically SIG_IGN-ing it), some don't. Presumably for that reason all subversion commands set SIGPIPE to SIG_IGN early in their main()-s. So should we. This, together with the previous patch, fixes the notorious "git-svn died of signal 13" problem (see e.g. http://thread.gmane.org/gmane.comp.version-control.git/134936). Signed-off-by: Roman Kagan <rkagan@mail.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-04-24git-svn: use POSIX::sigprocmask to block signalsLibravatar Roman Kagan1-6/+9
In order to maintain consistency of the database mapping svn revision numbers to git commit ids, rev_map_set() defers signal processing until it's finished with an append transaction.[*] The conventional way to achieve this is through sigprocmask(), which is available in perl in the standard POSIX module. This is implemented by this patch. One important consequence of it is that the signal handlers won't be unconditionally set to SIG_DFL anymore upon the first invocation of rev_map_set() as they used to. As a result, the signals ignored by git-svn parent will remain ignored; otherwise the behavior remains the same. This patch paves the way to ignoring SIGPIPE throughout git-svn which will be done in the followup patch. [*] Deferring signals is not enough to ensure the database consistency: the program may die on SIGKILL or power loss, run out of disk space, etc. However that's a separate issue that this patch doesn't address. Signed-off-by: Roman Kagan <rkagan@mail.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21git-svn.perl: fix a false-positive in the "already exists" testLibravatar Steven Walter1-17/+26
open_or_add_dir checks to see if the directory already exists or not. If it already exists and is not a directory, then we fail. However, open_or_add_dir did not previously account for the possibility that the path did exist as a file, but is deleted in the current commit. In order to prevent this legitimate case from failing, open_or_add_dir needs to know what files are deleted in the current commit. Unfortunately that information has to be plumbed through a couple of layers. Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21git-svn.perl: perform deletions before anything elseLibravatar Steven Walter1-1/+1
If we delete a file and recreate it as a directory in a single commit, we have to tell the server about the deletion first or else we'll get "RA layer request failed: Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request" Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21git-svn: Fix time zone in --localtimeLibravatar Wei-Yin Chen (陳威尹)1-7/+11
Use numerical form of time zone to replace alphabetic time zone abbreviation generated by "%Z". "%Z" is not portable and contain ambiguity for many areas. For example, CST could be "Central Standard Time" (GMT-0600) and "China Standard Time" (GMT+0800). Alphabetic time zone abbreviation is meant for human readability, not for specifying a time zone for machines. Failed case can be illustrated like this in linux shell: > echo $TZ Asia/Taipei > date +%Z CST > env TZ=`date +%Z` date Mon Dec 19 06:03:04 CST 2011 > date Mon Dec 19 14:03:04 CST 2011 [ew: fixed bad package reference inside Git::SVN::Log] Signed-off-by: Wei-Yin Chen (陳威尹) <chen.weiyin@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21git-svn: un-break "git svn rebase" when log.abbrevCommit=trueLibravatar Ævar Arnfjörð Bjarmason1-2/+1
Change git-svn to use git-rev-list(1) instead of git-log(1) since the latter is porcelain that'll cause "git svn rebase" to fail completely if log.abbrevCommit is set to true in the configuration. Without this patch the code will fail to parse a SHA1, and then just spew a bunch of "Use of uninitialized value $hash in string eq" warnings at "if ($c && $c eq $hash) { ..." and never do anything useful. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2012-02-21git-svn: remove redundant porcelain option to rev-listLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change an invocation of git-rev-list(1) to not use --no-color, git-rev-list(1) will always ignore that option and the --color option, so there's no need to pass it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-12-01git-svn.perl: close the edit for propedits even with no modsLibravatar Steven Walter1-1/+1
It's legitimate to update the mergeinfo property without actually changing any files. This can happen when changes are backported to a branch, and then that branch is merged back into mainline. We still want to record the updated mergeinfo for book-keeping. Signed-off-by: Steven Walter <stevenrwalter@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-11-01svn: Quote repository root in regex matchLibravatar Ted Percival1-2/+2
Fixes a problem matching repository URLs, especially those with a '+' in the URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as special characters by the regex matching. Signed-off-by: Ted Percival <ted.percival@quest.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-10-18Merge branch 'pt/mingw-misc-fixes'Libravatar Junio C Hamano1-8/+7
* pt/mingw-misc-fixes: t9901: fix line-ending dependency on windows mingw: ensure sockets are initialized before calling gethostname mergetools: use the correct tool for Beyond Compare 3 on Windows t9300: do not run --cat-blob-fd related tests on MinGW git-svn: On MSYS, escape and quote SVN_SSH also if set by the user t9001: do not fail only due to CR/LF issues t1020: disable the pwd test on MinGW
2011-10-16git-svn: Allow certain refs to be ignoredLibravatar Michael Olson1-5/+33
Implement a new --ignore-refs option which specifies a regex of refs to ignore while importing svn history. This is a useful supplement to the --ignore-paths option, as that option only operates on the contents of branches and tags, not the branches and tags themselves. Signed-off-by: Michael Olson <mwolson@gnu.org> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-10-16git svn dcommit: new option --interactive.Libravatar Frédéric Heitzmann1-1/+74
Allow the user to check the patch set before it is commited to SVN. It is then possible to accept/discard one patch, accept all, or quit. This interactive mode is similar with 'git send email' behaviour. However, 'git svn dcommit' returns as soon as one patch is discarded. Part of the code was taken from git-send-email.perl (see 'ask' function) Tests several combinations of potential answers to 'git svn dcommit --interactive'. For each of them, test whether patches were commited to SVN or not. Thanks-to Eric Wong <normalperson@yhbt.net> for the initial idea. Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Frédéric Heitzmann <frederic.heitzmann@gmail.com>
2011-10-14git-svn: On MSYS, escape and quote SVN_SSH also if set by the userLibravatar Sebastian Schuberth1-8/+7
While GIT_SSH does not require any escaping / quoting (e.g. for paths containing spaces), SVN_SSH requires it due to its use in a Perl script. Previously, SVN_SSH has only been escaped and quoted automatically if it was unset and thus derived from GIT_SSH. For user convenience, do the escaping and quoting also for a SVN_SSH set by the user. This way, the user is able to use the same unescaped and unquoted syntax for GIT_SSH and SVN_SSH. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05use -h for synopsis and --help for manpage consistentlyLibravatar Clemens Buchacher1-1/+1
A few scripted Porcelain implementations pretend as if the routine to show their own help messages are triggered upon "git cmd --help", but a command line parser of "git" will hijack such a request and shows the manpage for the cmd subcommand. Leaving the code to handle such input is simply misleading. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-13git-svn: teach git-svn to populate svn:mergeinfoLibravatar Bryan Jacobs1-0/+256
Allow git-svn to populate the svn:mergeinfo property automatically in a narrow range of circumstances. Specifically, when dcommitting a revision with multiple parents, all but (potentially) the first of which have been committed to SVN in the same repository as the target of the dcommit. In this case, the merge info is the union of that given by each of the parents, plus all changes introduced to the first parent by the other parents. In all other cases where a revision to be committed has multiple parents, cause "git svn dcommit" to raise an error rather than completing the commit and potentially losing history information in the upstream SVN repository. This behavior is disabled by default, and can be enabled by setting the svn.pushmergeinfo config option. [ew: minor style changes and manpage merge fix] Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Bryan Jacobs <bjacobs@woti.com>
2011-09-01git-svn: Teach dcommit --mergeinfo to handle multiple linesLibravatar Bryan Jacobs1-0/+3
"svn dcommit --mergeinfo" replaces the svn:mergeinfo property in an upstream SVN repository with the given text. The svn:mergeinfo property may contain commits originating on multiple branches, separated by newlines. Cause space characters in the mergeinfo to be replaced by newlines, allowing a user to create history representing multiple branches being merged into one. Update the corresponding documentation and add a test for the new functionality. Signed-off-by: Bryan Jacobs <bjacobs@woti.com> Acked-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-09-01git-svn: fix fetch with moved path when using rewriteRootLibravatar Eric Wong1-1/+1
The matching step in commit 3235b7053c45a734c1cdf9b117bda68b7ced29c9 did not properly account for users of the "rewriteRoot" configuration parameter. ref: <CANWsHyfHtr0EaJtNsDK9UTcmb_AbLg-1jUA-0uWJ-nEeNosb7w@mail.gmail.com> Suggested-by: H Krishnan <hetchkay@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2011-09-01git-svn: New flag to emulate empty directoriesLibravatar Ray Chen1-4/+144
Adds a --preserve-empty-dirs flag to the clone operation that will detect empty directories in the remote Subversion repository and create placeholder files in the corresponding local Git directories. This allows "empty" directories to exist in the history of a Git repository. Also adds the --placeholder-file flag to control the name of any placeholder files created. Default value is ".gitignore". Signed-off-by: Ray Chen <rchen@cs.umd.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-06-28git-svn: Correctly handle root commits in mergeinfo rangesLibravatar Michael Haggerty1-2/+6
If the bottom of a mergeinfo range is a commit that maps to a git root commit, then it doesn't have a parent. In such a case, use git commit range "$top_commit" rather than "$bottom_commit^..$top_commit". [ew: line-wrap at 80 columns] Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-06-28git-svn: Disambiguate rev-list arguments to improve error messageLibravatar Michael Haggerty1-2/+2
Add "--" in the "git rev-list" command line so that if there is a bug and the revisions cannot be found, the error message is a bit less cryptic. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2011-05-20Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: git-svn: Fix git svn log --show-commit
2011-05-20git-svn: Fix git svn log --show-commitLibravatar Michael J Gruber1-1/+1
git svn log --show-commit had no tests and, consequently, no attention by the author of b1b4755 (git-log: put space after commit mark, 2011-03-10) who kept git svn log working only without --show-commit. Introduce a test and fix it. Reported-by: Bernt Hansen <bernt@norang.ca> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>