summaryrefslogtreecommitdiff
path: root/git-svn.perl
Commit message (Collapse)AuthorAgeFilesLines
...
* git-svn: track writes writes to the index in fetchEric Wong2007-02-231-9/+41
| | | | | | | | | | | | | | Introducing Git::IndexInfo. This module will probably be useful outside of git-svn, so I'm not putting it in the Git::SVN namespace. This will allow me to more easily avoid the use of get_log() in the future and simply run do_update in incrementing ranges. get_log() should be avoided because there are cases where moved/deleted directories do not track correctly (until --follow-parent is run on a new branch). Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: --follow-parent now works on sub-directories of larger branchesEric Wong2007-02-231-8/+23
| | | | | | | | | | | | | | | | | | | | | | This means that tracking the path of: /another-larger/trunk/thunk/bump/thud inside a repository would follow: /larger-parent/trunk/thunk/bump/thud even if the svn log output looks like this: -------------------------------------------- Changed paths: A /another-larger (from /larger-parent:5) -------------------------------------------- Note: the usage of get_log() in git-svn still makes a an assumption that shouldn't be made with regard to revisions existing for a particular path. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: 'init' attempts to connect to the repository root if possibleEric Wong2007-02-231-20/+76
| | | | | | | This allows connections to be used more efficiently and not require users to run 'git-svn migrate --minimize' for new repositories. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: better error reporting if --follow-parent failsEric Wong2007-02-231-3/+14
| | | | | | | This will be useful to me when I try more special-cases of parent-tracking. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: allow 'init' to work outside of testsEric Wong2007-02-231-0/+1
| | | | | | | | | Tests always ran 'git init' before we ran so that repo-config would always have something to read. However that does not work in real-world situations where the user expects 'git svn init' to work without running 'git init' first. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: get rid of additional fetch-argumentsEric Wong2007-02-231-1/+6
| | | | | | | | It's not really useful anymore now that we have a better --follow-parent for the valid cases. Any other use of it is not valid. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: allow --follow-parent on deleted directoriesEric Wong2007-02-231-1/+1
| | | | | | | Any operations on the index in Git::SVN that is not wrapped by tmp_index_do() is wrong. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: disallow ambigious local refspecsEric Wong2007-02-231-7/+33
| | | | | | | | Having multiple fetch refspecs pointing to the same local ref would be a very bad thing. Start avoiding the use of fatal() or exit() inside the modules so we can libify more easily. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: --follow-parent works with svn-remotes multiple branchesEric Wong2007-02-231-17/+32
| | | | | | | | | | | | | | | Bugs fixed: * We didn't allow manually (not using git-svn) init-ed remotes/fetch refspecs to be used before. It works now because that's what I did in this test. git-svn init should offer more control in the future. * correctly strip paths in the delta editor when using do_switch(). * Make the -i / GIT_SVN_ID option work correctly when doing fetch on a multi-ref svn-remote Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: fix --follow-parent to work with Git::SVNEric Wong2007-02-231-90/+106
| | | | | | | While we're at it, beef up the test because I was getting false-passes during development. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: enable --minimize to simplify the config and connectionsEric Wong2007-02-231-6/+104
| | | | | | | | | --minimize will update the git-svn configuration to attempt to connect to the repository root (instead of directly to the path(s) we are tracking) in order to allow more efficient reuse of connections (for multi-fetch and follow-parent). Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: reuse open SVN::Ra connections by URLEric Wong2007-02-231-4/+6
| | | | | | | | Note: this can cause problems with Perl's reference counting GC, so I'm disabling Git::SVN::Ra::DESTROY. If we notice more problems down the line, we can disable this enhancement. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: fix a regression in dcommit that caused empty log messagesEric Wong2007-02-231-1/+2
| | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: add support for metadata in .git/configEric Wong2007-02-231-279/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Of course, we handle metadata migrations from previous versions and we have added unit tests. The new .git/config remotes resemble non-SVN remotes. Below is an example with comments: [svn-remote "git-svn"] ; like non-svn remotes, we have one URL per-remote url = http://foo.bar.org/svn ; 'fetch' keys are done in the same way as non-svn ; remotes, too. With the left-hand-side of the ':' ; being the remote (SVN) repository path relative to the ; above 'url' key; and the right-hand-side being a ; remote ref in git (refs/remotes/*). ; An empty left-hand-side means that it will fetch ; the entire contents of the 'url' key. ; old-style (migrated from previous versions of git-svn) ; are like this: fetch = :refs/remotes/git-svn ; this is created by a current version of git-svn ; using the multi-init command with an explicit ; url (specified above). This allows multi-init ; to reuse SVN::Ra connections. fetch = trunk:refs/remotes/trunk fetch = branches/a:refs/remotes/a fetch = branches/b:refs/remotes/b fetch = tags/0.1:refs/remotes/tags/0.1 fetch = tags/0.2:refs/remotes/tags/0.2 fetch = tags/0.3:refs/remotes/tags/0.3 [svn-remote "alt"] ; this is another old-style remote migrated over ; to the new config format url = http://foo.bar.org/alt fetch = :refs/remotes/alt Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: remove graft-branches commandEric Wong2007-02-231-526/+3
| | | | | | | | It's becoming a maintenance burden. I've never found it particularly useful myself, nor have I heard much feedback about it; so I'm assuming it's just as useless to everyone else. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: convert 'set-tree' command to use Git::SVNEric Wong2007-02-231-495/+17
| | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: switch dcommit to using Git::SVN codeEric Wong2007-02-231-84/+38
| | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: fetch/multi-fetch converted over to Git::SVN moduleEric Wong2007-02-231-38/+51
| | | | | | | --follow-parent and commit-diff are currently broken with this commit... Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: get rid of Memoize for now...Eric Wong2007-02-231-4/+0
| | | | I may refactor more of this stuff into separate modules
* git-svn: convert the 'commit-diff' command to Git::SVNEric Wong2007-02-231-133/+233
| | | | | | | | | | Also, convert all usage of 'log_msg' to 'log_entry' for consistency's sake SVN::Git::Editor::apply_diff now drives the rest of the editor. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: do not let Git.pm warn if we prematurely close pipesEric Wong2007-02-231-1/+1
| | | | | | This mainly quiets down warnings when running git svn log. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: port the 'rebuild' command to use Git::SVN objectsEric Wong2007-02-231-43/+28
| | | | | | Also correctly shared some variables needed for Git::SVN::Log Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: moved the 'log' command into its own namespaceEric Wong2007-02-231-327/+325
| | | | | | | | | | | | More cleanup to separate out functionality and make things nicer to hack on. While we're at it, centralize loading of the authors into one place and correctly handle '(no author)' cases in when showing logs after-the-fact; and not just at commit time. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: convert show-ignore over to Git::SVNEric Wong2007-02-231-7/+5
| | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: make multi-init capable of reusing the Ra connectionEric Wong2007-02-231-27/+23
| | | | | | | | | | | If a user specified a seperate URL and --tags/--branches as a sepearte URL, allow the Ra object (and therefore the connection) to be reused. We'll get rid of libsvn_ls_fullurl() since it was only used in one place. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: convert multi-init over to using Git::SVNEric Wong2007-02-231-41/+31
| | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: convert 'init' to use Git::SVNEric Wong2007-02-231-20/+18
| | | | | | While we're at it, fix up some bugs in Git::SVN. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: add Git::SVN module (to avoid global variables)Eric Wong2007-02-231-0/+485
| | | | | | | This should make it easier to improve multi-fetch and --follow-parent by avoiding global variables. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: cleanup: avoid re-use()ing Git.pm in sub-packagesEric Wong2007-02-231-13/+15
| | | | | | | | | | | I will be using functions from Git.pm in more modules, so I want to avoid re-importing the long argument list everywhere it's used. Also removed an unused command-line switch (--no-ignore-externals) and some variables. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: cleanup: put SVN workarounds into their own namespaceEric Wong2007-02-231-149/+173
| | | | | | | | | | | | | | Force some svn_ra functions to use a temporary pool via wrapper This cleans up the code a bit by removing explicit instances of pool allocation and deallocation and providing wrapper functions that make use of temporary pools. I've also added an explicit pool usage when creating the commit editor for commit-diff where get_commit_editor can be called multiple times with the same pool previously. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: cleanup: move process_rm aroundEric Wong2007-02-231-25/+19
| | | | | | (it's only used in one function now) Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: move authentication prompts into their own namespaceEric Wong2007-02-231-16/+24
| | | | | | I'm going to be reorganizing some more code. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* git-svn: correctly handle boolean options via git-configEric Wong2007-02-101-1/+1
| | | | | | | | | | We don't append a space after '--bool', so we can't expect a regular expression to match the space. Semi-noticed by Junio C Hamano :) Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: do not let Git.pm warn if we prematurely close pipesEric Wong2007-02-011-5/+5
| | | | | | | This mainly quiets down warnings when running git svn log. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Rename git-repo-config to git-config.Tom Prince2007-01-281-10/+10
| | | | | Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: remove leading slash when printing removed directoriesEric Wong2007-01-221-1/+1
| | | | | | | | | | Not sure why it was there in the first place, we always do our work relative to the URL we're connected to; even if that URL is the root of the repository, so the leading slash is pointless... Lets be consistent when printing things for the user to see. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: print and flush authentication prompts to STDERREric Wong2007-01-151-15/+22
| | | | | | | | | | | | | | People that redirect STDOUT output should always see STDERR prompts interactively. STDERR should always be flushed without buffering, so they should always show up. If that is unset, we still explicitly flush by calling STDERR->flush. The svn command-line client prompts to STDERR, too. Signed-off-by: Eric Wong <normalperson@yhbt.net> 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>
* git-svn: pass an unambiguous ref to rev-list when grafting-branchesEric Wong2007-01-071-1/+1
| | | | | | | | Some users apparently create local heads with the same basename as the remote branch they're tracking. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: add --prefix= option to multi-initEric Wong2007-01-071-3/+5
| | | | | | | | Also, document --{trunk,branches,tags} options while we're documenting multi-init options. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: fix show-ignoreEric Wong2007-01-061-1/+1
| | | | | | | | Looks like I broke it in 747fa12cef73b6ca04fffaddaad7326cf546cdea but never noticed. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: make --repack work consistently between fetch and multi-fetchEric Wong2007-01-041-4/+6
| | | | | | | | | | | | | | | Since fetch reforks itself at most every 1000 revisions, we need to update the counter in the parent process to have a working count if we set our repack interval to be > ~1000 revisions. multi-fetch has always done this correctly because of an extra process; now fetch uses the extra process; as well. While we're at it, only compile the $sha1 regex that checks for repacking once. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: make multi-init less confusingEric Wong2007-01-041-38/+40
| | | | | | | | | | | | It now requires at least one of the (trunk|branch|tags) arguments (either from the command-line or in .git/config). Also we make sure that anything that is passed as a URL ('help') in David's case is actually a URL. Thanks to David Kågedal for reporting this issue. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: sort multi-init outputEric Wong2006-12-281-1/+1
| | | | | | | This looks a bit more pleasant for users. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: verify_ref() should actually --verifyEric Wong2006-12-281-1/+2
| | | | | | | Not sure how I missed this the first time around... Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: print out the SVN library version in --version, tooEric Wong2006-12-281-1/+1
| | | | | | | | This could be useful in finding new problems and helping users debug. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: remove non-delta fetch code pathsEric Wong2006-12-281-174/+20
| | | | | | | | | | | | | | | | | | | | We have less code to worry about now. As a bonus, --revision can be used to reliably skip parts of history whenever fetch is run, not just the first time. I'm not sure why anybody would want to skip history in the middle, however... For people (nearly everyone at the moment) without the do_switch() function in their Perl SVN library, the entire tree must be refetched if --follow-parent is used and a parent is found. Future versions of SVN will have a working do_switch() function accessible via Perl. Accessing repositories on the local machine (especially file:// ones) is also slightly slower as a result; but I suspect most git-svn users will be using it to access remote repositories. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: dcommit should diff against the current HEAD after committingEric Wong2006-12-261-3/+3
| | | | | | | | | | This is a followup to dd31da2fdc199132c9fd42023aea5b33672d73cc. Regardless of whether we commit an alternate head, we always diff-tree based on the current HEAD, and rebase against our remote reference as necessary. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: enable common fetch/commit options for dcommitEric Wong2006-12-221-1/+1
| | | | | | | | | | dcommit does commits and fetches, so all options used for those should work, too, including --authors-file. Reported missing by Nicolas Vilz. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: rename 'commit' command to 'set-tree'Eric Wong2006-12-161-6/+6
| | | | | | | | | | | 'set-tree' probably accurately describes what the command formerly known as 'commit' does. I'm not entirely sure that 'dcommit' should be renamed to 'commit' just yet... Perhaps 'push' or 'push-changes'? Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>