aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* contrib/git-svn: fix a copied-tree bug in an overzealous assertionEric Wong2006-03-03
| | | | | | | | | | | | | | | | | | | I thought passing --stop-on-copy to svn would save us from all the trouble svn-arch-mirror had with directory (project) copies. I was wrong, there was one thing I overlooked. If a tree was moved from /foo/trunk to /bar/foo/trunk with no other changes in r10, but the last change was done in r5, the Last Changed Rev (from svn info) in /bar/foo/trunk will still be r5, even though the copy in the repository didn't exist until r10. Now, if we ever detect that the Last Changed Rev isn't what we're expecting, we'll run svn diff and only croak if there are differences between them. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: better documenting of CLI switchesEric Wong2006-03-03
| | | | | | | Also, fix a asciidoc formatting error Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: add --id/-i=$GIT_SVN_ID command-line switchEric Wong2006-03-03
| | | | | | | | I ended up using GIT_SVN_ID far more than I ever thought I would. Typing less is good. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: avoid re-reading the repository uuid, it never changesEric Wong2006-03-03
| | | | | | | | | If it does change, we're screwed anyways as SVN will refuse to commit or update. We also never access more than one SVN repository per-invocation, so we can store it as a global, too. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: create a more recent master if one does not existEric Wong2006-03-03
| | | | | | | | | | | | In a new repository, the initial fetch creates a master branch if one does not exist so HEAD has something to point to. It now creates a master at the end of the initial fetch run, pointing to the latest revision. Previously it pointed to the first revision imported, which is generally less useful. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: cleanup option parsingEric Wong2006-03-03
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: allow --authors-file to be specifiedEric Wong2006-03-03
| | | | | | | | | | | | Syntax is compatible with git-svnimport and git-cvsimport: normalperson = Eric Wong <normalperson@yhbt.net> If this option is specified and git-svn encounters an SVN committer name that it cannot parse, it git-svn will abort. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: strip 'git-svn-id:' when commiting to SVNEric Wong2006-03-03
| | | | | | | | | | | We regenerate and use git-svn-id: whenever we fetch or otherwise commit to remotes/git-svn. We don't actually know what revision number we'll commit to SVN at commit time, so this is useless. It won't throw off things like 'rebuild', though, which knows to only use the last instance of git-svn-id: in a log message Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: several small bug fixes and changesEric Wong2006-03-03
| | | | | | | | | | | | | | | * Fixed manually-edited commit messages not going to remotes/git-svn on sequential commits after the sequential commit optimization. * format help correctly after adding 'show-ignore' * sha1_short regexp matches down to 4 hex characters (from git-rev-parse --short documentation) * Print the first line of the commit message when we commit to SVN next to the sha1. * Document 'T' (type change) in the comments Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: add -b/--branch switch for branch detectionEric Wong2006-03-03
| | | | | | | | | | | | | | | | | | I've said I don't like branches in Subversion, and I still don't. This is a bit more flexible, though, as the argument for -b is any arbitrary git head/tag reference. This makes some things easier: * Importing git history into a brand new SVN branch. * Tracking multiple SVN branches via GIT_SVN_ID, even from multiple repositories. * Adding tags from SVN (still need to use GIT_SVN_ID, though). * Even merge tracking is supported, if and only the heads end up with 100% equivalent tree objects. This is more stricter but more robust and foolproof than parsing commit messages, imho. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: pass the missing argument _show_clicked_cb.Aneesh Kumar K.V2006-03-02
| | | | | | | | | In our last update to use the encoding while showing the commit diff we added a new argument to this function. But we missed updating all the callers. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: use refs/remotes/git-svn instead of git-svn-HEADEric Wong2006-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After reading a lengthy discussion on the list, I've come to the conclusion that creating a 'remotes' directory in refs isn't such a bad idea. You can still branch from it by specifying remotes/git-svn (not needing the leading 'refs/'), and the documentation has been updated to reflect that. The 'git-svn' part of the ref can of course be set to whatever you want by using the GIT_SVN_ID environment variable, as before. I'm using refs/remotes/git-svn, and not going with something like refs/remotes/git-svn/HEAD as it's redundant for Subversion where there's zero distinction between branches and directories. Run git-svn rebuild --upgrade to upgrade your repository to use the new head. git-svn-HEAD must be manually deleted for safety reasons. Side note: if you ever (and I hope you never) want to run git-update-refs on a 'remotes/' ref, make sure you have the 'refs/' prefix as you don't want to be clobbering your 'remotes/' in $GIT_DIR (where remote URLs are stored). Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Use horizontal scroll bar in the tree viewAneesh Kumar K.V2006-03-01
| | | | | | | | | Earlier we set up the window to never scroll horizontally, which made it harder to use on a narrow screen. This patch allows scrollbar to be used as needed by Gtk Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Set the default width of graph cellAneesh Kumar K.V2006-02-28
| | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Some window layout changes.Aneesh Kumar K.V2006-02-28
| | | | | | | This makes menubar look nice Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Select the text color based on whether the entry in highlighted. ↵Pavel Roskin2006-02-28
| | | | | | | Use standard font. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: correct commit example in manpageEric Wong2006-02-27
| | | | | | | Thanks to Nicolas Vilz <niv@iaglans.de> for noticing this. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: tell the user to not modify git-svn-HEAD directlyEric Wong2006-02-27
| | | | | | | | | As a rule, interface branches to different SCMs should never be modified directly by the user. They are used exclusively for talking to the foreign SCM. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Remove trailing white spaceAneesh Kumar K.V2006-02-27
| | | | | | | Do the cleanup using Dave jones vim script Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Fix the encoding related bugAneesh Kumar K.V2006-02-27
| | | | | | | | Get the encoding information from repository and convert it to utf-8 before passing to gtk.TextBuffer.set_text. gtk.TextBuffer.set_text work only with utf-8 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: version 0.10.0Eric Wong2006-02-26
| | | | | | | | New features deserve an increment of the minor version. This will very likely become 1.0.0 unless release-critical bugs are found. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: optimize sequential commits to svnEric Wong2006-02-26
| | | | | | | | | | | Avoid running 'svn up' to a previous revision if we know the revision we just committed is the first descendant of the revision we came from. This reduces the time to do a series of commits by about 25%. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: add show-ignore commandEric Wong2006-02-26
| | | | | | | | | Recursively finds and lists the svn:ignore property on directories. The output is suitable for appending to the $GIT_DIR/info/exclude file. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Fix the graph display .Aneesh Kumar K.V2006-02-24
| | | | | | | | | | | | | | | | | | | | This fix all the known issue with the graph display The bug need to be explained graphically | a This line need not be there ---->| \ b | | / c c is parent of a and all a,b and c are placed on the same line and b is child of c With my last checkin I added a seperate line to indicate that a is connected to c. But then we had the line connecting a and b which should not be ther. This changes fixes the same bug Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Code cleanupAneesh Kumar K.V2006-02-24
| | | | | | | Rearrange the code little bit so that it is easier to read Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Bump the revAneesh Kumar2006-02-24
| | | | | | | Make the 0.7 release Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Fix DeprecationWarningAneesh Kumar2006-02-24
| | | | | | | DeprecationWarning: integer argument expected, got float Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Display the lines joining commit nodes clearly.Aneesh Kumar K.V2006-02-23
| | | | | | | | | | Since i wanted to limit the graph box size i was resetting the window after an index of 5. This result in line joining commit nodes to pass over nodes which are not related. The changes fixes the same Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: ls-remote invocation shellquote safety.Junio C Hamano2006-02-22
| | | | | | This will allow you to point GIT_DIR at directories with funny names. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Use monospace font to draw the branch and tag nameaneesh.kumar@gmail.com2006-02-21
| | | | | | | | | | This patch address the below: Use monospace font to draw branch and tag name set the font size to 13. Make the graph column resizable. This helps to accommodate large tag names Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: Read tag and branch information using git ls-remoteaneesh.kumar@gmail.com2006-02-21
| | | | | | | | | | | | | | | This fix the below bug Junio C Hamano <junkio@cox.net> writes: > > It does not work in my repository, since you do not seem to > handle branch and tag names with slashes in them. All of my > topic branches live in directories with two-letter names > (e.g. ak/gitview). Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: 0.9.1: add --version and copyright/license (GPL v2+) informationEric Wong2006-02-20
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn: add Makefile, test, and associated ignoresEric Wong2006-02-20
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: fix several corner-case and rare bugs with 'commit'Eric Wong2006-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of these were really show-stoppers (or even triggered) on most of the trees I've tracked. * Node change prevention for identically named nodes. This is a limitation of SVN, but we find the error and exit before it's passed to SVN so we don't dirty our working tree when our commit fails. git-svn will exit with an error code 1 if any of the following conditions are found: 1. a directory is removed and a file of the same name of the removed directory is created 1a. a file has its parent directory removed and the file is takes the name of the removed parent directory:: baz/zzz => baz 2. a file is removed and a directory of the same name of the removed file is created. 2a. a file is moved into a deeper directory that shares the previous name of the file:: dir/$file => dir/file/$file Since SVN cannot handle these cases, the user will have to manually split the commit into several parts. * --rmdir now handles nested/deep removals. If dir/a/b/c/d/e/file is removed, and everything else is in the dir/ hierarchy is otherwise empty, then dir/ will be deleted when file is deleted from svn and --rmdir specified. * Always assert that we have written the tree we want to write on commits. This helped me find several bugs in the symlink handling code (which as been fixed). * Several symlink handling fixes. We now refuse to set permissions on symlinks. We also always unlink a file if we're going to overwrite it. * Apply changes in a pre-determined order, so we always have rename from locations handy before we delete them. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* contrib/git-svn.txt: add a note about renamed/copied directory supportEric Wong2006-02-20
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: change ; to && in addremove()Eric Wong2006-02-20
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: remove any need for the XML::Simple dependencyEric Wong2006-02-20
| | | | | | | | | | | XML::Simple was originally required back when I made svn-arch-mirror because I needed to explictly track renames with Arch. Then I carried it over to git-svn because I was afraid somebody could commit an svn log message that could throw off a non-XML log parser. Then I noticed the <n> lines column in the header. So, no more XML :) Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: Allow for more argument types for commit (from..to)Eric Wong2006-02-20
| | | | | | | | | | Allow 'from..to' notation from the command line. More liberal sha1 parsing when reading from stdin no longer requires the sha1 to be the first character, so a leading 'commit ' string is OK. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: allow --find-copies-harder and -l<num> to be passed on commitEric Wong2006-02-20
| | | | | | | | Both of these options are passed directly to git-diff-tree when committing to a SVN repository. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: fix a typo in defining the --no-stop-on-copy optionEric Wong2006-02-20
| | | | | | | | Just a typo, I doubt anybody would use (and I highly recommend not using) this option anyways. But you never know... Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add an Emacs interface in contrib.Alexandre Julliard2006-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an Emacs interface for git. The user interface is modeled on pcl-cvs. It has been developed on Emacs 21 and will probably need some tweaking to work on XEmacs. The basic command is 'M-x git-status' which displays a buffer listing modified files in the selected project tree. In that buffer the following features are supported: - add/remove files - list unknown files - commit marked files - manage .gitignore - commit merges based on MERGE_HEAD - revert files to the HEAD version - resolve conflicts with smerge or ediff - diff files against HEAD/base/mine/other or combined diff - get a log of the revisions for specified files There are plenty of unimplemented features too, see the TODO list at the top of the file... Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitview: typofixAneesh Kumar K.V2006-02-18
| | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
* git-svn: remove files from the index before adding/updatingEric Wong2006-02-18
| | | | | | | | This fixes a bug when importing where a directory gets removed/renamed but is immediately replaced by a file of the same name in the same revision. Signed-off-by: Eric Wong <normalperson@yhbt.net>
* Add a README for gitviewAneesh Kumar K.V2006-02-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add contrib/README.Junio C Hamano2006-02-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add contrib/gitview from Aneesh.Aneesh Kumar2006-02-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: ensure fetch always works chronologically.Eric Wong2006-02-17
| | | | | | | | | | | | | | | We run svn log against a URL without a working copy for the first fetch, so we end up a log that's sorted from highest to lowest. That's bad, we always want lowest to highest. Just default to --revision 0:HEAD now if -r isn't specified for the first fetch. Also sort the revisions after we get them just in case somebody accidentally reverses the argument to --revision for whatever reason. Thanks again to Emmanuel Guerin for helping me find this. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: fix revision order when XML::Simple is not loadedEric Wong2006-02-17
| | | | | | | Thanks to Emmanuel Guerin for finding the bug. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Introducing contrib/git-svn.Eric Wong2006-02-16