aboutsummaryrefslogtreecommitdiffstats
path: root/src/svn.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Return after renaming a repo to prevent importing the empty commit.Colin Guthrie2014-05-291-0/+11
| | | | | | | | | This should be fine provided the cp did not also change files... If there was a way to find out if the change is a net null, that would be useful here. Also, as we only use tags for markrelease on master branch, we can ignore any cross repo tag copies as they will just clober the data we have already.
* Support repository renaming.Colin Guthrie2014-05-291-21/+59
| | | | | | | | | | | | | | | | | This allows us to svn mv the cauldron/PKG/current folder to a new name and have this copied over to git. It does not yet handle the case where subsequent commits to previous distros for the old name are magically moved over to the new name for the repo (which I think is the correct behaviour as noted on the sysadm mailing list) so some kind of rename mapping will have to be kept (if I ever implement resuming support, then this map will have to be dumped to a file and restored again about restart) Another problem is that the tags are apparently all squashed up due to the svn mv commit, but this should be handled via a simple return... after dealing with the repo rename (although some changes may get lost :( if this is not a straight copy (i.e. svn cp + changes in the same txn)
* Move the repo renaming to a method for convenience.Colin Guthrie2014-05-281-12/+1
| | | | This also renames log and marks files.
* Handle master branch deletion.Colin Guthrie2014-05-241-1/+24
| | | | | | | | | | | | | If the master branch is deleted, this typically means we are obsoleting our package. Rather than 'deal' with the branch deletion, simply rename the repository and then continue. We will likely have to deal with a later resurrection and also deal with package renames better too (e.g. one commit renames and resurrecting a specific package that was subsequently brought back from the dead) but this will be dealt with in a later commit.
* Add the ability to autocreate repositories.Colin Guthrie2014-05-241-9/+24
| | | | | | | | | In Mageia, we have 13k+ packages and have very strict repo layout. Due to this we want to autocreate repositories when we import packages from subversion to git. This does not really support reloading and continuing etc. but hopefully that is sufficient for our import.
* Fix compilation, the last rebase/merge went wrong.Ulrich Spörlein2012-11-281-1/+1
| | | | Noticed by: Andy Pilate
* Remove unused includes.Ulrich Spörlein2012-11-271-2/+0
| | | | Forgotten by yours truly in commit 1234336.
* Make conversion runs deterministic by sorting what's returned via hash from ↵Ulrich Spörlein2012-11-261-23/+51
| | | | | | | | | | | | | | | | | | | the SVN API. An SVN commit spanning multiple paths that shall be turned into multiple branches in git would result in the git commits to be fed into git fast-import in arbitrary order. This is problematic for merge commits, as it means the list of parent commits for the merge commit will have an arbitrary order. Fix this by always handling the paths in an SVN commit in order. This makes svn2git conversion runs reproducible. Unfortunately, commits where paths have been removed and added again, might no longer be handled correctly. I haven't found such a case in the FreeBSD repository however. This is IHMO a bug in git, but it all hinges on semantics like list of parents vs. set of parents and how you define a hash on a set of objects that have no natural order.
* Revert "Remove the branch copy heuristic"Torgny Nyblom2012-11-261-0/+12
| | | | This reverts commit c0187417902b10698135727d911ab9018f4941eb.
* Merge commit 'refs/merge-requests/17' of gitorious.org:svn2git/svn2git into ↵Torgny Nyblom2012-11-231-7/+7
|\ | | | | | | mr/17
| * Match rules for files below a recursionSebastian Dörner2012-07-151-7/+7
| |
* | Merge commit 'refs/merge-requests/20' of gitorious.org:svn2git/svn2git into ↵Torgny Nyblom2012-11-231-14/+10
|\ \ | | | | | | | | | mr/20
| * | Remove the branch copy heuristicUlrich Spörlein2012-09-191-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FreeBSD project has a different approach to branches than the standard SVN or GIT models of how branches should work. An MFC from head/ to stable/8 is a cherry-pick in git and should never result in a merge commit. Sadly, this means that "IFCs" from head/ to project/foo also no longer are merge commits, though they really are ... Reported by: Ryan Stone <rysto32@gmail.com>
| * | Allow user-overriding of default email domainUlrich Spörlein2012-05-111-2/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | Lazy projects where svn user X has email X@project.org don't need to compile (and update) an identity-map for rolling conversions. This can be mixed with a real identity-map, so only misses in the map will have the user then show up as X@project.org Also change the defaults somewhat. I don't like the NFS reserved username nobody to show up in SVN or git logs, but am keeping that for now.
* | Merge commit 'refs/merge-requests/13' of git://gitorious.org/svn2git/svn2git ↵Torgny Nyblom2012-08-211-0/+3
|\ \ | |/ |/| | | into merge-requests/13
| * Do not recurse() into the svn path unless it is an existing directory.Modestas Vainius2011-04-241-0/+3
| | | | | | | | Otherwise "action recurse" may fail on files or something else unknown.
* | Support substitutions for repository/branch names.Modestas Vainius2011-04-241-0/+6
|/ | | | | | | | | | | | | | | This patch adds support for 's///' style substitutions for the repository/branch names in the match rulesets. Useful when e.g. eliminating characters not supported in git branch names. Syntax: match /... repository some_repo substitute repository s/pattern/replacement/ branch some_branch substitute branch s/pattern/replacement/ end match
* Remove unnecessary const casts.Nicolás Alvarez2011-03-161-4/+4
|
* Commit branch creation when requested and not on next transaction commitTorgny Nyblom2011-02-071-1/+3
| | | | | | | Branches was created by adding the command to a list, this list was then written to git when the next transaction was committed. This had the side effect that if the branch creation was the last thing the branch was never created.
* Delay transaction creation untill usage.Torgny Nyblom2011-01-161-8/+8
| | | | | This might fix the issue with an extra empty diff commit before all tags.
* Add option for using the real content of an SVN branch when creating aTorgny Nyblom2010-12-211-0/+15
| | | | new branch instead of using the contents of the git "from" branch.
* Only fetch revision properties once per revisionTorgny Nyblom2010-12-161-1/+6
|
* Be more clear about what are warningsTorgny Nyblom2010-12-161-4/+4
|
* Move branch creation/deletion/restting to Repository and write these inTorgny Nyblom2010-12-151-0/+4
| | | | | | commit() Prepare for handling cvs2svn borked tags/branches
* Delete before other changesTorgny Nyblom2010-12-131-3/+15
| | | | | Fix issue where if a branch reset was triggered before a branch deletion in the same revision the reset was overridden by the deletion
* Add an option to print some stats after a run.Torgny Nyblom2010-12-041-0/+2
|
* Merge branch 'master' of gitorious.org:svn2git/svn2gitTorgny Nyblom2010-11-141-4/+1
|\
| * Fix detecting directory movesNiko Sams2010-11-131-4/+1
| | | | | | | | | | | | | | | | | | is_dir wasn't reported correctly, I guess because the path didn't exist anymore at that revision. Reuse the existing wasDir function as it works perfectly. With not detecting the path as a dir, the / got not added, an thus the rule for the source not found.
* | Print revision information with "copy from" warningTorgny Nyblom2010-11-011-1/+1
|/
* Print the missing from path when warning about missing sourceTorgny Nyblom2010-11-011-1/+1
|
* Merge branch 'master' of gitorious.org:svn2git/svn2gitNiko Sams2010-10-041-33/+45
|\
| * Allow more then one rule file to be used in a single run.Torgny Nyblom2010-09-291-30/+42
| |
| * Unify debug messages and Match structsTorgny Nyblom2010-09-281-3/+3
| |
* | support svn commit that converts a link into a file in one commitNiko Sams2010-10-041-4/+10
|/ | | | this happens in kde svn rev 841619
* Better log messagesTorgny Nyblom2010-09-091-2/+2
|
* Only add a '/' if the path is a dirTorgny Nyblom2010-09-081-1/+7
|
* More verbose debug outputTorgny Nyblom2010-09-081-4/+4
|
* Try and work around cvs2svn branching/tagging issues where the directory ↵Torgny Nyblom2010-09-081-0/+7
| | | | tree is not what it seems like
* Make sure that the path part is empty before deleting a whole branch. If the ↵Torgny Nyblom2010-09-041-2/+2
| | | | prefix option for a rule is used current == svnprefix does not mean that we are dealing with the root of a branch, path needs to be empty as well.
* White space cleanup & debug statmentsTorgny Nyblom2010-09-041-78/+101
|
* Merge branch 'master' of git://gitorious.org/svn2git/svn2gitRaja R Harinath2010-08-241-2/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | The conflict was mainly around two different approaches to fixing the linear commitMarks issue. The precise tracking of commit marks per branch is better, and that's how I resolved the merge conflict. While at it, I also removed the "revision-*" files, since the "log-*" files already have the same information, and the branch information too. Conflicts: src/repository.cpp src/repository.h
| * Merge commit 'refs/merge-requests/1' of ↵Torgny Nyblom2010-08-091-1/+1
| |\ | | | | | | | | | git://gitorious.org/~marcguenther/svn2git/marcguenther-svn2git into integration
| | * Fix broken utf-8 filenames.Pavel Plesov2010-05-181-1/+1
| | |
| * | Exit if unable to open repositoryTorgny Nyblom2010-08-091-1/+4
| |/
* | Remove exit(1) in createBranch. Return EXIT_SUCCESS/EXIT_FAILURE insteadRaja R Harinath2010-07-201-3/+3
| | | | | | | | | | | | Allow graceful exit of all fast-import processes when createBranch fails. For consistency, add return value to deleteBranch, even though it always returns EXIT_SUCCESS.
* | Handle branching better for branches that use "prefix" rulesRaja R Harinath2010-07-121-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | When creating branches/tags off a branch that use "prefix" rules, svn2git used to create new commits rather than just copying the git ref over. This was due to SvnRevision::exportInteral() using 'path.isEmpty()' to determine if a change related to the whole branch or not. If a "prefix" rule is used, then 'path' will not be empty. We change it to instead look at how much of the change string was chomped up by the rule match. If the whole string was chomped up, it means that the change describes the whole branch.
* | Handle SVN directory deletes that lead to branch deletesRaja R Harinath2010-07-081-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVN directory deletes often indicate one or more branch deletions. However, since the deleted directory isn't present in the resulting revision, several of the indicators used by the rule-application mechanism aren't present. This forces us to introduce several useless dummy rules to avoid errors. We now note deletions and use the previous revision to determine several properties, including whether the deleted item is a directory or not, and to enumerate the contents of the directory in recurse mode. We add an additional heuristic for unknown repositories -- i.e., when a rule fired, but it's repository was invalid. We recurse in this case hoping to catch a more specific rule. I believe this is safe: because some other rule must've seen the same directory before, when it or a subdirectory was created, and decided _not_ to create a repository at that point -- so recursing and/or ignoring the contents of the just deleted directory won't corrupt the history, it can only improve it. We use mark :0 to note mark deletions internally, and in the progress logs. (Note that cvs2svn creates wierd commits where a whole tree is copied first, and then subtrees are pruned. In such cases, neither the previous revision nor the current revision have the deleted directory -- we ignore this case as before. There's no information loss since the final contents of the revision are exactly what is desired.)
* | Don't skip same branch revisions when inferring multiple merge parents.Raja R Harinath2010-07-011-6/+2
| | | | | | | | | | Experience with the mono tree shows that it isn't too annoying, and there might be some useful history hidden in there.
* | Infer some copy sources as additional parentsRaja R Harinath2010-07-011-45/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We use a literal meaning of multiple commit parents to allow us to infer some partial repository copying as merges. This helps us 1) track history despite some directory reorganization 2) link subset commits to parents 3) infer some merges which were achieved by overwriting a subtree with contents from another branch This seems to work well enough even with cvs2svn monster commits. The heuristics have been tuned by gut feel to work reasonably well with mono's SVN repository. They can definitely be improved.
* | Handle same branch copies using createBranch to allow reseatingRaja R Harinath2010-07-011-12/+12
|/ | | | branch tip to an older revision.