summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix PPC SHA1 routine for large input buffersPaul Mackerras2006-06-181-1/+1
| | | | | | | | | | The PPC SHA1 routine had an overflow which meant that it gave incorrect results for input buffers >= 512MB. This fixes it by ensuring that the update of the total length in bits is done using 64-bit arithmetic. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make t8001-annotate and t8002-blame more portableDennis Stosberg2006-06-181-3/+1
| | | | | | | | | | | These two tests assume that "sed" will not modify the final line of a stream if it does not end with a newline character. The assumption is not true at least for FreeBSD and Solaris 9. FreeBSD's "sed" appends a newline character; "sed" in Solaris 9 even removes the incomplete final line. This patch makes the test use perl instead. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Remove "refs" field from "struct object"Linus Torvalds2006-06-185-74/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This shrinks "struct object" to the absolutely minimal size possible. It now contains /only/ the object flags and the SHA1 hash name of the object. The "refs" field, which is really needed only for fsck, is maintained in a separate hashed lookup-table, allowing all normal users to totally ignore it. This helps memory usage, although not as much as I hoped: it looks like the allocation overhead of malloc (and the alignment constraints in particular) means that while the structure size shrinks, the actual allocation overhead mostly does not. [ That said: memory usage is actually down, but not as much as it should be: I suspect just one of the object types actually ended up shrinking its effective allocation size. To get to the next level, we probably need specialized allocators that don't pad the allocation more than necessary. ] The separation makes for some code cleanup, though, and makes the ref tracking that fsck wants a clearly separate thing. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make release tarballs friendlier to older tar versionsRene Scharfe2006-06-181-1/+1
| | | | | | | | | | | git-tar-tree adds an extended pax header to archives if its first parameter points to a commit. It confuses older tars and isn't very useful in the case of git anyway, so stop doing it. Idea: Junio, implementation: Junio. I just wrote it up. :-) Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-tar-tree: no more void pointer arithmeticRene Scharfe2006-06-181-2/+5
| | | | | | | | | Noticed by Florian Forster: Use a char pointer when adding offsets, because void pointer arithmetic is a GNU extension. Const'ify the function arguments while we're at it. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-tar-tree: documentation updateRene Scharfe2006-06-181-5/+10
| | | | | | | | | | * add example on how to avoid adding a global extended pax header * don't mention linux anymore, use git itself as an example instead * update to v1.4.0 ;-) * append missing :: to the examples Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-tar-tree: Simplify write_trailer()Rene Scharfe2006-06-181-25/+15
| | | | | | | | | We can write the trailer in one or at most two steps; it will always fit within two blocks. With the last caller of get_record() gone we can get rid of it. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Some more memory leak avoidanceLinus Torvalds2006-06-173-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | This is really the dregs of my effort to not waste memory in git-rev-list, and makes barely one percent of a difference in the memory footprint, but hey, it's also a pretty small patch. It discards the parent lists and the commit buffer after the commit has been shown by git-rev-list (and "git log" - which already did the commit buffer part), and frees the commit list entry that was used by the revision walker. The big win would be to get rid of the "refs" pointer in the object structure (another 5%), because it's only used by fsck. That would require some pretty major surgery to fsck, though, so I'm timid and did the less interesting but much easier part instead. This (percentually) makes a bigger difference to "git log" and friends, since those are walking _just_ commits, and thus the list entries tend to be a bigger percentage of the memory use. But the "list all objects" case does improve too. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Move "void *util" from "struct object" into "struct commit"Linus Torvalds2006-06-176-42/+48
| | | | | | | | | | | | | | | | | Every single user actually wanted this only for commit objects, and we have no reason to waste space on it for other object types. So just move the structure member from the low-level "struct object" into the "struct commit". This leaves the commit object the same size, and removes one unnecessary pointer from all other object allocations. This shrinks memory usage (still at a fairly hefty half-gig, admittedly) of "git-rev-list --all --objects" on the mozilla repo by another 5% in my tests. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Shrink "struct object" a bitLinus Torvalds2006-06-1721-96/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shrinks "struct object" by a small amount, by getting rid of the "struct type *" pointer and replacing it with a 3-bit bitfield instead. In addition, we merge the bitfields and the "flags" field, which incidentally should also remove a useless 4-byte padding from the object when in 64-bit mode. Now, our "struct object" is still too damn large, but it's now less obviously bloated, and of the remaining fields, only the "util" (which is not used by most things) is clearly something that should be eventually discarded. This shrinks the "git-rev-list --all" memory use by about 2.5% on the kernel archive (and, perhaps more importantly, on the larger mozilla archive). That may not sound like much, but I suspect it's more on a 64-bit platform. There are other remaining inefficiencies (the parent lists, for example, probably have horrible malloc overhead), but this was pretty obvious. Most of the patch is just changing the comparison of the "type" pointer from one of the constant string pointers to the appropriate new TYPE_xxx small integer constant. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge early part of branch 'jc/fetchupload'Junio C Hamano2006-06-171-0/+16
|\
| * fetch-pack: give up after getting too many "ack continue"Junio C Hamano2006-05-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | If your repository have more roots than the remote repository you ask an object for, the remote upload-pack keeps responding "ack continue" until it fills up its received-have buffer (currently 256 entries). Usually this is not a problem because the requester stops traversing the ancestry chain from the commit it gets "ack continue" for, but this mechanism does not work as a roadblock when it traverses down the path to the root the other side does not have. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/rw-prefix'Junio C Hamano2006-06-177-13/+141
|\ \ | | | | | | | | | | | | | | | | | | * jc/rw-prefix: read-tree: reorganize bind_merge code. write-tree: --prefix=<path> read-tree: --prefix=<path>/ option.
| * | read-tree: reorganize bind_merge code.Junio C Hamano2006-05-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This does not change the logic but moves the order of checks around so that merging of read-tree safety code would become easier. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | write-tree: --prefix=<path>Junio C Hamano2006-05-015-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "bind" commit can express an aggregation of multiple projects into a single commit. In such an organization, there would be one project, root of whose tree object is at the same level of the root of the aggregated projects, and other projects have their toplevel in separate subdirectories. Let's call that root level project the "primary project", and call other ones just "subprojects". You would first read-tree the primary project, and then graft the subprojects under their appropriate location using read-tree --prefix=<subdir>/ repeatedly. To write out a tree object from such an index for a subproject, write-tree --prefix=<subdir>/ is used. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | read-tree: --prefix=<path>/ option.Junio C Hamano2006-05-012-8/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With "--prefix=<path>/" option, read-tree keeps the current index contents, and reads the contents of named tree-ish under directory at `<prefix>`. The original index file cannot have anything at the path `<prefix>` itself, and have nothing in `<prefix>/` directory. This can be used to graft an independent tree into a subdirectory of the current index. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'pe/date'Junio C Hamano2006-06-171-1/+1
|\ \ \ | | | | | | | | | | | | | | | | * pe/date: date.c: improve guess between timezone offset and year.
| * | | date.c: improve guess between timezone offset and year.Paul Eggert2006-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When match_digit() guesses a four-digit string to tell if it is a year or a timezone, it did not consider that some real-world places have UTC offsets equal to +1400. $ date; TZ=UTC0 date; TZ=Pacific/Kiritimati date Wed Jun 7 23:25:42 PDT 2006 Thu Jun 8 06:25:42 UTC 2006 Thu Jun 8 20:25:42 LINT 2006 Signed-off-by: Paul Eggert <eggert@CS.UCLA.EDU> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | mailinfo: ignore blanks after in-body headers.Junio C Hamano2006-06-171-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [jc: this is based on Eric's patch but also fixes up the parsed subject headers]. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Don't parse any headers in the real body of an email message.Eric W. Biederman2006-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was pointed out that the current behaviour might mispart a patch comment so remove this behaviour for now. [jc: this fixes "From: line in the middle" check in t5100 test.] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | t5100: mailinfo and mailsplit tests.Junio C Hamano2006-06-1717-0/+626
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the test passes with 1.3.3 but not with the tip of "master". This is to verify the fixes from Eric W Biedermann. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Make t4101-apply-nonl bring along its patchesDennis Stosberg2006-06-1713-5/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of "diff" (e.g. on FreeBSD and older Linux systems) do not support the "\ No newline at end of file" remark and are not able to generate the patches needed for this test. This lets the test fail, although git-apply is working perfectly. This patch adds the pre-generated patches to t/t4100/ and makes the test use them. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Update gitweb README: gitweb is now included with gitJakub Narebski2006-06-171-8/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | git-cvsexportcommit.perl: fix typoSven Verdoolaege2006-06-171-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | gitweb.cgi history not shownLinus Torvalds2006-06-163-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does: - add a "rev.simplify_history" flag which defaults to on - it turns it off for "git whatchanged" (which thus now has real semantics outside of "git log") - it adds a command line flag ("--full-history") to turn it off for others (ie you can make "git log" and "gitk" etc get the semantics if you want to. Now, just as an example of _why_ you really really really want to simplify history by default, apply this patch, install it, and try these two command lines: gitk --full-history -- git.c gitk -- git.c and compare the output. So with this, you can also now do git whatchanged -p -- gitweb.cgi git log -p --full-history -- gitweb.cgi and it will show the old history of gitweb.cgi, even though it's not relevant to the _current_ state of the name "gitweb.cgi" NOTE NOTE NOTE! It will still actually simplify away merges that didn't change anything at all into either child. That creates these bogus strange discontinuities if you look at it with "gitk" (look at the --full-history gitk output for git.c, and you'll see a few strange cases). So the whole "--parent" thing ends up somewhat bogus with --full-history because of this, but I'm not sure it's worth even worrying about. I don't think you'd ever want to really use "--full-history" with the graphical representation, I just give it as an example exactly to show _why_ doing so would be insane. I think this is trivial enough and useful enough to be worth merging into the stable branch. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Implement safe_strncpy() as strlcpy() and use it more.Peter Eriksen2006-06-169-27/+28
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | gitweb: Make the `blame' interface in gitweb optional.Florian Forster2006-06-161-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `git-annotate' is an expensive operation to run it may be desirable to deactivate this functionality. This patch introduces the `gitweb.blame' option to git-repo-config and disables the blame support by default. Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | gitweb: Adding a `blame' interface.Florian Forster2006-06-161-1/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an interface for `git-blame' to `gitweb.cgi'. Links to it are placed in `git_blob'. Internally the code uses `git-annotate' because `git-blame's output differs for files that have been renamed in the past. However, I like the term `blame' better. [jc: blame can be told to produce the compatible format btw...] Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | cvsimport: keep one index per branch during importMartin Langhoff2006-06-161-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we have a speedup and much lower IO when importing trees with many branches. Instead of forcing index re-population for each branch switch, we keep many index files around, one per branch. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | cvsimport: complete the cvsps run before starting the importMartin Langhoff2006-06-161-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now capture the output of cvsps to a tempfile, and then read it in. cvsps 2.1 works quite a bit "in memory", and only prints its patchset info once it has finished talking with cvs, but apparently retaining all that memory allocation. With this patch, cvsps is finished and reaped before cvsimport start working (and growing). So the footprint of the whole process is much lower. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | cvsimport: ignore CVSPS_NO_BRANCH and impossible branchesMartin Langhoff2006-06-161-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cvsps output often contains references to CVSPS_NO_BRANCH, commits that it could not trace to a branch. Ignore that branch. Additionally, cvsps will sometimes draw circular relationships between branches -- where two branches are recorded as opening from the other. In those cases, and where the ancestor branch hasn't been seen, ignore it. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | blame: Add --time to produce raw timestampsFredrik Kuivinen2006-06-162-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fix the usage string and clean up the docs while we are at it Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | fix git aliasJunio C Hamano2006-06-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When extra command line arguments are given to a command that was alias-expanded, the code generated a wrong argument list, leaving the original alias in the result, and forgetting to terminate the new argv list. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Add a "--notags" option for git-p4import.Sean2006-06-162-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | P4import currently creates a git tag for every commit it imports. When importing from a large repository too many tags can be created for git to manage, so this provides an option to shut that feature off if necessary. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
* | | | Merge git://git.bogomips.org/git-svnJunio C Hamano2006-06-165-297/+2150
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.bogomips.org/git-svn: (25 commits) git-svn: rebuild convenience and bugfixes git-svn: svn (command-line) 1.0.x compatibility git-svn: tests no longer fail if LC_ALL is not a UTF-8 locale git-svn: bugfix and optimize the 'log' command git-svn: Eliminate temp file usage in libsvn_get_file() git-svn: fix several small bugs, enable branch optimization git-svn: avoid creating some small files git-svn: make the $GIT_DIR/svn/*/revs directory obsolete git-svn: add support for Perl SVN::* libraries git-svn: add 'log' command, a facsimile of basic `svn log' git-svn: add UTF-8 message test git-svn: add some functionality to better support branches in svn git-svn: add --shared and --template= options to pass to init-db git-svn: add --repack and --repack-flags= options git-svn: minor cleanups, extra error-checking git-svn: Move all git-svn-related paths into $GIT_DIR/svn git-svn: support manually placed initial trees from fetch git-svn: optimize --branch and --branch-all-ref git-svn: --branch-all-refs / -B support git-svn: support -C<num> passing to git-diff-tree ...
| * | | | git-svn: rebuild convenience and bugfixesEric Wong2006-06-161-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will now automatically fetch the refs/remotes/git-svn ref from origin and store a Pull: line for it. --remote=<origin> may be passed if your remote is named something other than 'origin' Also, remember to make GIT_SVN_DIR whenever we need to create .rev_db Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: svn (command-line) 1.0.x compatibilityEric Wong2006-06-162-43/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested on a plain Ubuntu Warty installation using subversion 1.0.6-1.2ubuntu3 svn add --force was never needed, as it only affected directories, which git (thankfully) doesn't track The 1.0.x also didn't support symlinks(!), so allow NO_SYMLINK to be defined for running tests Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: tests no longer fail if LC_ALL is not a UTF-8 localeEric Wong2006-06-162-4/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: bugfix and optimize the 'log' commandEric Wong2006-06-161-8/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revisions with long commit messages were being skipped, since the 'git-svn-id' metadata line was at the end and git-log uses a 32k buffer to print the commits. Also the last 'git-svn-id' metadata line in a commit is always the valid one, so make sure we use that, as well. Made the verbose flag work by passing the correct option switch ('--summary') to git-log. Finally, optimize -r/--revision argument handling by passing the appropriate limits to revision Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: Eliminate temp file usage in libsvn_get_file()Eric Wong2006-06-161-33/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means we'll have a loose object when we encounter a symlink but that's not the common case. We also don't have to worry about svn:eol-style when using the SVN libraries, either. So remove the code to deal with that. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: fix several small bugs, enable branch optimizationEric Wong2006-06-161-65/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Share the repack counter between branches when doing multi-fetch. Pass the -d flag to git repack by default. That's the main reason we will want automatic pack generation, to save space and improve disk cache performance. I won't add -a by default since it can generate extremely large packs that make RAM-starved systems unhappy. We no longer generate the .git/svn/$GIT_SVN_ID/info/uuid file, either. It was never read in the first place. Check for and create .rev_db if we need to during fetch (in case somebody manually blew away their .rev_db and wanted to start over. Mainly makes debugging easier). Croak with $? instead of $! if there's an error closing pipes Quiet down some of the chatter, too. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: avoid creating some small filesEric Wong2006-06-161-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | repo_path_split() is already pretty fast, and is already optimized via caching. We also don't need to create an exclude file if we're relying on the SVN libraries. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: make the $GIT_DIR/svn/*/revs directory obsoleteEric Wong2006-06-164-132/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a very intrusive change, so I've beefed up the tests significantly. Added 'full-test' a target to the Makefile, to test different possible configurations. This is intended for maintainers only. Users should only be concerned with 'test' succeeding. We now have a very simple custom database format for handling mapping of svn revisions => git commits. Of course, we're not really using it yet, either. Also disabled automatic branch-finding on new trees for now. It's too easily broken. revisions_eq() function should be helpful for branch detection. Also removed an extra assertion in fetch_cmd() that wasn't correctly done. This bug was found by full-test. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: add support for Perl SVN::* librariesEric Wong2006-06-163-111/+974
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means we no longer have to deal with having bloated SVN working copies around and we get a nice performance increase as well because we don't have to exec the SVN binary and start a new server connection each time. Of course we have to manually manage memory with SVN::Pool whenever we can, and hack around cases where SVN just eats memory despite pools (I blame Perl, too). I would like to keep memory usage as stable as possible during long fetch/commit processes since I still use computers with only 256-512M RAM. commit should always be faster with the SVN library code. The SVN::Delta interface is leaky (or I'm not using it with pools correctly), so I'm forking on every commit, but that doesn't seem to hurt performance too much (at least on normal Unix/Linux systems where fork() is pretty cheap). fetch should be faster in most common cases, but probably not all. fetches will be faster where client/server delta generation is the bottleneck and not bandwidth. Of course, full-files are generated server-side via deltas, too. Full files are always transferred when they're updated, just like git-svnimport and unlike command-line svn. I'm also hacking around memory leaks (see comments) here by using some more forks. I've tested fetch with http://, https://, file://, and svn:// repositories, so we should be reasonably covered in terms of error handling for fetching. Of course, we'll keep plain command-line svn compatibility as a fallback for people running SVN 1.1 (I'm looking into library support for 1.1.x SVN, too). If you want to force command-line SVN usage, set GIT_SVN_NO_LIB=1 in your environment. We also require two simultaneous connections (just like git-svnimport), but this shouldn't be a problem for most servers. Less important commands: show-ignore is slower because it requires repository access, but -r/--revision <num> can be specified. graft-branches may use more memory, but it's a short-term process and is funky-filename-safe. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: add 'log' command, a facsimile of basic `svn log'Eric Wong2006-06-161-17/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This quick feature should make it easy to look up svn log messages when svn users refer to -r/--revision numbers. The following features from `svn log' are supported: --revision=<n>[:<n>] - is supported, non-numeric args are not: HEAD, NEXT, BASE, PREV, etc ... -v/--verbose - just maps to --raw (in git log), so it's completely incompatible with the --verbose output in svn log --limit=<n> - is NOT the same as --max-count, doesn't count merged/excluded commits --incremental - supported (trivial :P) New features: --show-commit - shows the git commit sha1, as well --oneline - our version of --pretty=oneline Any other arguments are passed directly to `git log' Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: add UTF-8 message testEric Wong2006-06-161-0/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: add some functionality to better support branches in svnEric Wong2006-06-161-5/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New commands: graft-branches - The most interesting command of the bunch. It detects branches in SVN via various techniques (currently regexes and file copies). It can be later extended to handle svk and other properties people may use to track merges in svk. Basically, merge tracking is not standardized at all in the SVN world, and git grafts are perfect for dealing with this situation. Existing branch support (via tree matches) is only handled at fetch time. The following tow were originally implemented as shell scripts several months ago, but I just decided to streamline things a bit and added them to the main script. multi-init - supports git-svnimport-like command-line syntax for importing repositories that are layed out as recommended by the SVN folks. This is a bit more tolerant than the git-svnimport command-line syntax and doesn't require the user to figure out where the repository URL ends and where the repository path begins. multi-fetch - runs fetch on all known SVN branches we're tracking. This will NOT discover new branches (unlike git-svnimport), so multi-init will need to be re-run (it's idempotent). Consider these three to be auxilliary commands (like show-ignore, and rebuild) so their behavior won't receive as much testing or scrutiny as the core commands (fetch and commit). Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: add --shared and --template= options to pass to init-dbEric Wong2006-06-161-2/+8
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: add --repack and --repack-flags= optionsEric Wong2006-06-161-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should help keep disk usage sane for large imports. --repack takes an optional argument for the interval, it defaults to 1000 if no argument is specified. Arguments to --repack-flags are passed directly to git-repack. No arguments are passed by default. Idea stolen from git-cvsimport :) Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git-svn: minor cleanups, extra error-checkingEric Wong2006-06-161-36/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, read_repo_config has been added and expanded to handle case where command-line arguments are optional to Getopt::Long Signed-off-by: Eric Wong <normalperson@yhbt.net>