summaryrefslogtreecommitdiff
path: root/git-svn.perl
AgeCommit message (Collapse)AuthorFilesLines
2009-08-10git-svn: ignore leading blank lines in svn:ignoreLibravatar Michael Haggerty1-0/+2
Subversion ignores all blank lines in svn:ignore properties. The old git-svn code ignored blank lines everywhere except for the first line of the svn:ignore property. This patch makes the "git svn show-ignore" and "git svn create-ignore" commands ignore leading blank lines, too. Also include leading blank lines in the test suite. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-08-10svn: Honor --prefix option in init without --stdlayoutLibravatar Adam Brewster1-1/+2
Most users who type git svn init file:///tmp/repo --prefix=my-svn/ would expect the root of the svn repository to be tracked by refs/remotes/my-svn/git-svn. Acked-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: make minimize URL more reliable over http(s)Libravatar Eric Wong1-1/+5
In addition to path-based restrictions, Subversion servers over http(s) may have access controls implemented via the LimitExcept directive in Apache. In some cases, LimitExcept may be (arguably) misconfigured to not allow REPORT requests while allowing OPTIONS and PROPFIND. This caused problems with our existing minimize_url logic that only issued OPTIONS and PROPFIND requests when connecting and using SVN::Ra::get_latest_revnum. We now call SVN::Ra::get_log if get_latest_revnum succeeds, resulting in a REPORT request being sent. This will increase our chances of tripping access controls before we start attempting to fetch history. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: avoid escaping '/' when renaming/copying filesLibravatar Eric Wong1-1/+1
Timothy Schaeffer reported the following: > Git-svn has been giving me the following error for some time > when calling "git svn dcommit": > > RA layer request failed: PROPFIND request failed on > '/svn/stf/branches/dev/sw%2Fdpemu%2Finclude%2FNetCnxn.h': PROPFIND of > '/svn/stf/branches/dev/sw%2Fdpemu%2Finclude%2FNetCnxn.h': 302 Found > (https://oursvnrepo.net) at /usr/local/libexec/git-core/git-svn line 508 > > This only occurred when git detected a rename or copy. > > Following the lead into git-svn.perl, > and noticing that some of the '/'s in the path were hex-encoded > and some were not, > I changed the regex used to find chars > to hex-encode in the relative part of the path > to exclude '/'. > It works, so far. > I have included a patch. While this has previous not been a problem in my experience, newer versions of SVN may be stricter and this does not introduce regressions in t9115. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: the branch command no longer needs the full pathLibravatar Eric Wong1-3/+16
This was introduced in 0b2af457a49e3b00d47d556d5301934d27909db8 ("Fix branch detection when repository root is inaccessible") but reintroduced in the previous commit. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: revert default behavior for --minimize-urlLibravatar Eric Wong1-1/+6
This reverts the --minimize-url behavior change that appeared recently in commit 0b2af457a49e3b00d47d556d5301934d27909db8 ("Fix branch detection when repository root is inaccessible"). However, we now allow the option to be turned off by allowing "--no-minimize-url" so people with limited-access setups can still take advantage of the fix in 0b2af457a49e3b00d47d556d5301934d27909db8. Also document the behavior and default settings of minimize-url in the manpage for the first time. This introduces a temporary UI regression to allow t9141 to pass that will be reverted (fixed) in the next commit. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-25git svn: add gc commandLibravatar Robert Allan Zeh1-0/+33
Add a git svn gc command that gzips all unhandled.log files, and removes all index files under .git/svn. Signed-off-by: Robert Allan Zeh <robert.a.zeh@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-22git svn: fix shallow clone when upstream revision is too newLibravatar Eric Wong1-0/+1
Thanks to Ka-Hing Cheung for the initial bug report and patch: > git-svn uses $ra->get_latest_revnum to find out the latest > revision, but that can be problematic, because get_latest_revnum > returns the latest revnum in the entire repository, not > restricted by whatever URL you used to construct $ra. So if you > do git svn clone -r HEAD svn://blah/blah/trunk, it won't work if > the latest checkin is in one of the branches (it will try to > fetch a rev that doesn't exist in trunk, making the clone > useless). Relying on SVN::Core::INVALID_REVNUM (-1) as the "start" argument to SVN::Ra::get_log() proved unreliable with http(s) URLs so the result of SVN::Ra::get_latest_revnum() is used as the "start" argument instead. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-19git svn: fix reparenting when ugly http(s) URLs are usedLibravatar Eric Wong1-2/+4
Mishandling of http(s) in need of escaping was causing t9118-git-svn-funky-branch-names to fail when SVN_HTTPD_PORT was defined. This bug was exposed in (but not caused by) commit 0b2af457a49e3b00d47d556d5301934d27909db8 (Fix branch detection when repository root is inaccessible) Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-11git svn: allow uppercase UUIDs from SVNLibravatar Eric Wong1-7/+7
SVN allows uppercase A-F characters in repositories. Although `svnadmin' does not create UUIDs with uppercase by default, it is possible to change the UUID of a SVN repository and SVN itself will make no attempt to normalize them. Thanks to Esben Skovenborg for discovering this issue. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-07-11git-svn: Fix branch detection when repository root is inaccessibleLibravatar Mattias Nissler1-26/+17
For the case of multiple projects sharing a single SVN repository, it is common practice to create the standard SVN directory layout within a subdirectory for each project. In such setups, access control is often used to limit what projects a given user may access. git-svn failed to detect branches (e.g. when passing --stdlayout to clone) because it relied on having access to the root directory in the repository. This patch solves this problem by making git-svn use paths relative to the given repository URL instead of the repository root. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-07-11git-svn: Always duplicate paths returned from get_logLibravatar Mattias Nissler1-22/+23
This makes get_log more safe to use because callers cannot run into path clobbering any more. The additional overhead will not affect performance since the critical calls from the fetch loop need the path duplication anyway and the rest of the call sites is not performance critical. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-06-26git-svn: Canonicalize svn urls to prevent libsvn assertionLibravatar Ulrich Dangel1-1/+8
Cloning/initializing svn repositories with an uncanonicalize url does not work as libsvn throws an assertion. This patch canonicalize svn uris for the clone and init command from git-svn. [ew: fixed trailing whitespace] Signed-off-by: Ulrich Dangel <uli@spamt.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-06-25git-svn: convert globs to regexps for branch destinationsLibravatar Eric Wong1-1/+3
Marc Branchaud wrote: > I'm fairly happy with this, except for the way the branch > subcommand matches refspecs. The patch does a simple string > comparison, but it'd be better to do an actual glob. I just > couldn't track down the right function for that, so I left it as > a strcmp and hope that a gitizen can tell me how to glob here. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-06-25git svn: Support multiple branch and tag paths in the svn repository.Libravatar Marc Branchaud1-22/+56
This enables git-svn.perl to read multiple 'branches' and 'tags' entries in svn-remote config sections. The init and clone subcommands also support multiple --branches and --tags arguments. The branch (and tag) subcommand gets a new argument: --destination (or -d). This argument is required if there are multiple branches (or tags) entries configured for the remote Subversion repository. The argument's value specifies which branch (or tag) path to use to create the branch (or tag). The specified value must match the left side (without wildcards) of one of the branches (or tags) refspecs in the svn-remote's config. [ew: avoided explicit loop when combining globs with "push"] Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-06-25Add 'git svn reset' to unwind 'git svn fetch'Libravatar Ben Jackson1-5/+40
Add a command to unwind the effects of fetch by moving the rev_map and refs/remotes/git-svn back to an old SVN revision. This allows revisions to be re-fetched. Ideally SVN revs would be immutable, but permissions changes in the SVN repository or indiscriminate use of '--ignore-paths' can create situations where fetch cannot make progress. Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-06-25git-svn: speed up find_rev_beforeLibravatar Ben Jackson1-0/+2
By limiting start revision of find_rev_before to max existing revision. This avoids a long wait if you do 'git svn reset -r 9999999'. The linear search within the contiguous revisions doesn't seem to be a problem. [ew: expanded commit message] Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-06-25Add 'git svn help [cmd]' which works outside a repo.Libravatar Ben Jackson1-0/+3
Previously there was no explicit 'help' command, but 'git svn help' still printed the usage message (as an invalid command), provided you got past the initialization steps that required a valid repo. Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-06-25git-svn: let 'dcommit $rev' work on $rev instead of HEADLibravatar Thomas Rast1-2/+32
'git svn dcommit' takes an optional revision argument, but the meaning of it was rather scary. It completely ignored the current state of the HEAD, only looking at the revisions between SVN and $rev. If HEAD was attached to $branch, the branch lost all commits $rev..$branch in the process. Considering that 'git svn dcommit HEAD^' has the intuitive meaning "dcommit all changes on my branch except the last one", we change the meaning of the revision argument. git-svn temporarily checks out $rev for its work, meaning that * if a branch is specified, that branch (_not_ the HEAD) is rebased as part of the dcommit, * if some other revision is specified, as in the example, all work happens on a detached HEAD and no branch is affected. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-28git-svn: refuse to dcommit non-UTF-8 messagesLibravatar Eric Wong1-3/+14
...without i18n.commitencoding set in the config. SVN tries to store all commit messages in UTF-8, however it is up to the job of the clients to enforce this rule. SVN servers themselves do not always enforce this; allowing clients to commit malformed UTF-8 messages and break repositories. So git-svn will enforce this and tell the user to set i18n.commitencoding when a git commit is is not in UTF-8. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: add --authors-prog optionLibravatar Mark Lodato1-3/+29
Add a new option, --authors-prog, to git-svn that allows a more flexible alternative (or supplement) to --authors-file. This allows more advanced username operations than the authors file will allow. For example, one may look up Subversion users via LDAP, or may generate the name and email address from the Subversion username. Notes: * If both --authors-name and --authors-prog are given, the former is tried first, falling back to the later. * The program is called once per unique SVN username, and the result is cached. * The command-line argument must be the path to a program, not a generic shell command line. The absolute path to this program is taken at startup since the git-svn script changes directory during operation. * The option is not enabled for `git svn log'. [ew: fixed case where neither --authors-(name|prog) were defined] Signed-off-by: Mark Lodato <lodatom@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: Set svn.authorsfile if it is passed to git svn cloneLibravatar Alex Vandiver1-0/+1
Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: Correctly report max revision when following deleted pathsLibravatar Alex Vandiver1-1/+1
Report the maximum found revision in the range, instead of the minimum changed revision. Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-21git-svn: Fix for svn paths removed > log-window-size revisions agoLibravatar Alex Vandiver1-1/+5
Instead of trying to find the end of the commit history only in the last window, track if we have seen commits yet, and use that to judge if we need to backtrack and look for a tail. Otherwise, conversion can silently lose up to 100 revisions of a branch if it was deleted >100 revisions ago. Signed-off-by: Alex Vandiver <alexmv@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-05-05Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: improve error message in config.c t4018-diff-funcname: add cpp xfuncname pattern to syntax test Work around BSD whose typeof(tv.tv_sec) != time_t git-am.txt: reword extra headers in message body git-am.txt: Use date or value instead of time or timestamp git-am.txt: add an 'a', say what 'it' is, simplify a sentence dir.c: Fix two minor grammatical errors in comments git-svn: fix a sloppy Getopt::Long usage
2009-05-05Merge branch 'rj/maint-1.6.0-svn-parse-fix' into maintLibravatar Junio C Hamano1-1/+1
* rj/maint-1.6.0-svn-parse-fix: git-svn: fix a sloppy Getopt::Long usage
2009-05-05git-svn: fix a sloppy Getopt::Long usageLibravatar Robin H. Johnson1-1/+1
Getopt-Long v2.38 is much stricter about sloppy getopt usage. The trailing pipe causes git-svn testcases to fail for all of the --stdin argument calls. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-11git-svn: always initialize with core.autocrlf=falseLibravatar Johannes Schindelin1-0/+1
It has been reported time and time again in relation to msysGit that git-svn does not work well when core.autocrlf has any value other than 'false'. So let's make it so by default. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-11git-svn: Save init/clone --ignore-paths in configLibravatar Ben Jackson1-0/+3
The --ignored-paths argument is now stored as "svn-remote.$REMOTE_NAME.ignore-paths" in the config file. [ew: edited subject and message] Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-04-11git-svn: Add per-svn-remote ignore-paths configLibravatar Ben Jackson1-11/+15
The --ignore-paths option to fetch is very useful for working on a subset of a SVN repository. For proper operation, every command that causes a fetch (explicit or implied) must include a matching --ignore-paths option. This patch adds a persistent svn-remote.$repo_id.ignore-paths config by promoting Fetcher::is_path_ignored to a member function and initializing $self->{ignore_regex} in Fetcher::new. Command line --ignore-paths is still recognized and acts in addition to the config value. Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-04-11git-svn: speed up blame commandLibravatar Boris Byk1-4/+50
'git svn blame' now uses the 'git cat-file --batch' command to speed up resolving SVN revision number out of commit SHA by removing fork+exec overhead. [ew: enforced 80-column line wrap] Signed-off-by: Boris Byk <boris.byk@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-04-11git-svn: add fetch --parent optionLibravatar Jason Merrill1-4/+14
Signed-off-by: Jason Merrill <jason@redhat.com> Acked-By: Eric Wong <normalperson@yhbt.net>
2009-03-30git-svn: add a double quiet option to hide git commitsLibravatar Simon Arlott1-4/+5
People may expect/prefer -q to still show git commits, so this change allows a second -q to hide them. Signed-off-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-03-29git-svn: fix ls-tree usage with dash-prefixed pathsLibravatar Eric Wong1-6/+9
To find the blob object name given a tree and pathname, we were incorrectly calling "git ls-tree" with a "--" argument followed by the pathname of the file we wanted to get. git ls-tree <TREE> -- --dashed/path/name.c Unlike many command-line interfaces, the "--" alone does not symbolize the end of non-option arguments on the command-line. ls-tree interprets the "--" as a prefix to match against, thus the entire contents of the --dashed/* hierarchy would be returned because the "--" matches "--dashed" and every path under it. Thanks to Anton Gyllenberg for pointing me toward the Twisted repository as a real-world example of this case. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-29git-svn: don't output git commits in quiet modeLibravatar Simon Arlott1-3/+3
Ideally only errors should be output in this mode so fetch can be run from cron and normally produce no output. Without this change it would output a single line on each git commit, e.g. r1909 = 32ef87860662526d4a62f903949ed21e0341079e (u2_10_12_branch) Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-03-28git-svn: fix ls-tree usage with dash-prefixed pathsLibravatar Eric Wong1-6/+9
To find the blob object name given a tree and pathname, we were incorrectly calling "git ls-tree" with a "--" argument followed by the pathname of the file we wanted to get. git ls-tree <TREE> -- --dashed/path/name.c Unlike many command-line interfaces, the "--" alone does not symbolize the end of non-option arguments on the command-line. ls-tree interprets the "--" as a prefix to match against, thus the entire contents of the --dashed/* hierarchy would be returned because the "--" matches "--dashed" and every path under it. Thanks to Anton Gyllenberg for pointing me toward the Twisted repository as a real-world example of this case. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-03-09git-svn: support intermediate paths when matching tags/branchesLibravatar Michael Lai1-1/+4
For repositories laid out like the following: [svn-remote "svn"] url = http://foo.com/svn/repos/bar fetch = myproject/trunk:refs/remotes/trunk branches = bar/myproject/branches/*:refs/remotes/* tags = bar/myproject/tags/*:refs/remotes/tags/* The "bar" component above is considered the intermediate path and was not handled correctly. Signed-off-by: Michael Lai <myllai@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-02-27git-svn - return original format_svn_date semanticsLibravatar Ben Walton1-1/+1
When %z was removed from the strftime call and subsituted with a local gmt offset calculation, time() was no longer the default for all time functions as it was with the previous localtime(shift). This is now corrected so that format_svn_time behaves as it used to. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-27git-svn: disable broken symlink workaround by defaultLibravatar Eric Wong1-1/+1
Even though this will break things for some extremely rare repositories used by broken Windows clients, it's probably not worth enabling this by default as it has negatively affected many more users than it has helped from what we've seen so far. The extremely rare repositories that have broken symlinks in them will be silently corrupted in import; but users can still reenable this option and restart the import. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-24git-svn fix to avoid using strftime %zLibravatar Ben Walton1-1/+7
%z isn't available on all platforms in the date formatting routines. Provide a workalike capability that should be more portable. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-02-23git-svn: read the dcommit url from the config file on a per remote basisLibravatar Peter Oberndorfer1-1/+11
The commit url for dcommit is determined in the following order: commandline option --commit-url svn.commiturl svn-remote.<name>.commiturl svn-remote.<name>.url Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-02-22git-svn: fix delete+add branch tracking with empty filesLibravatar Eric Wong1-0/+1
Original bug report and test case by Björn Steinbrink. Björn Steinbrink <B.Steinbrink@gmx.de> wrote: > Hi Eric, > > seems that the empty symlink stuff gets confused about which revision to > use when looking for the parent's file. > > r3 = f1a6fcf6b0a1c4a373d0b2b65a3d70700084f361 (tags/1.0.1) > Found possible branch point: file:///home/doener/h/svn/tags/1.0 => file:///home/doener/h/svn/branches/1.0, 4 > Found branch parent: (1.0) 63ae640ba01014ecbb3df590999ed1fa5914545b > Following parent with do_switch > Successfully followed parent > r5 = 26fcfef5bcced97ab74faf1af7341a2ae0d272aa (1.0) > Found possible branch point: file:///home/doener/h/svn/branches/1.0 => file:///home/doener/h/svn/tags/1.0.1, 5 > Found branch parent: (tags/1.0.1) 26fcfef5bcced97ab74faf1af7341a2ae0d272aa > Following parent with do_switch > Scanning for empty symlinks, this may take a while if you have many empty files > You may disable this with `git config svn.brokenSymlinkWorkaround false'. > This may be done in a different terminal without restarting git svn > Filesystem has no item: File not found: revision 3, path '/branches/1.0/file' at /usr/local/libexec/git-core/git-svn line 3318 > > Note how it tries to look at revision 3 instead of revision 5 (which it > correctly detected as the parent). The import succeeds when > svn.brokenSymlinkWorkaround is set to false. Testcase below. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-02-22git-svn: Create leading directories in create-ignoreLibravatar Brian Gernhardt1-1/+5
Since SVN tracks empty directories and git does not, we can not assume that the directory exists when creating .gitignore files. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-02-18git-svn: fix parsing of timestamp obtained from svnLibravatar Junio C Hamano1-1/+1
Ward Wouts reports that git-svn barfed like this: Unable to parse date: 2004-03-09T09:44:33.Z at /usr/bin/git-svn line 3995 The parse_svn_date sub expects there always are one or more digits after the decimal point to record fractional seconds, but this example does not and results in a failure like this. The fix is based on the original fix by the reporter, further cleaned up. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-02-15git-svn: Fix for rewriteRoot URL containing username.Libravatar Dévai Tamás1-0/+1
If the new svn root URL given with the svn-remote.<repo>.rewriteRoot config option (or by the --rewrite-root option to 'git svn init') contains a username (such as 'svn+ssh://username@example.com/repo'), find_by_url() cannot find the repository URL, because the URL contained in the commit message does have the username removed. Signed-off-by: Dévai Tamás <devait@mailbox.sk> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-11git-svn: fix broken symlink workaround when switching branchesLibravatar Eric Wong1-5/+6
Thanks to Anton Gyllenberg <anton@iki.fi> for the bug report (and testcase in the following commit): > Commit dbc6c74d0858d77e61e092a48d467e725211f8e9 "git-svn: > handle empty files marked as symlinks in SVN" caused a > regression in an unusual case where a branch has been created > in SVN, later deleted and then created again from another > branch point and the original branch point had empty files not > in the new branch. In some cases git svn fetch will then fail > while trying to fetch the empty file from the wrong SVN > revision. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-02-11git-svn: Print revision while searching for earliest use of pathLibravatar Deskin Miller1-0/+3
When initializing a git-svn repository from a Subversion repoository, it is common to be interested in a path which did not exist in the initial commit to Subversion. In a large repository, the initial fetch may take some looking for the earliest existence of the path time while the user receives no additional feedback. Print the highest revision number scanned thus far to let the user know something is still happening. Signed-off-by: Deskin Miller <deskinm@umich.edu>
2009-02-11git-svn: abstract out a block into new method other_gs()Libravatar Sam Vilain1-16/+24
We will be adding a more places that need to find git revisions corresponding to new parents, so abstract out this section into a new method. Signed-off-by: Yuval Kogman <nothingmuch@woobling.org> Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net> [ew: minor formatting changes]
2009-02-11git-svn: allow disabling expensive broken symlink checksLibravatar Eric Wong1-0/+20
Since dbc6c74d0858d77e61e092a48d467e725211f8e9, git-svn has had an expensive check for broken symlinks that exist in some repositories. This leads to a heavy performance hit on repositories with many empty blobs that are not supposed to be symlinks. The workaround is enabled by default; and may be disabled via: git config svn.brokenSymlinkWorkaround false Reported by Markus Heidelberg. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-01-25git-svn: add --ignore-paths option for fetchingLibravatar Vitaly \"_Vi\" Shukela1-11/+22
This will be useful when somebody want to checkout something partially from repository with some non-standart layout or exclude some files from it. Example: repository has structure /module-{a,b,c}/{trunk,branches,tags}/... Modules are interdependent, and you want it to be single repostory (to commit to all modules simultaneously and view complete history), but do not want branches and tags be checked out into working copy. Other use case is excluding some large blobs. The quirk for now is that user must specify this option every fetch/rebase; in other case he may get extra files or "file not found" errors. It may be will be resolved by adding regular expression to .git/config into [svn-remote ...] to make it persistent. Signed-off-by: Vitaly "_Vi" Shukela <public_vi@tut.by> Acked-by: Eric Wong <normalperson@yhbt.net> [ew: replaced 4-space indent with tabs] [ew: prefixed $ignore_regex with an underscore to be consistent with other globals in git-svn] [ew: rearranged functions to minimize diff and removed prototype usage to be consistent with the rest of git-svn (and other Perl code in git (and they're ugly to me)]