aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* More verbose debug outputTorgny Nyblom2010-09-081-4/+4
|
* Inter branch merging causes git log to break with fatal internal errorsTorgny Nyblom2010-09-081-4/+4
|
* Don't print the same message as in Transaction()Torgny Nyblom2010-09-081-4/+0
| | | | Creation is already printed at the bottom.
* 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-044-239/+282
|
* Fix character encodingTorgny Nyblom2010-08-251-1/+1
|
* Merge branch 'master' of git://gitorious.org/svn2git/svn2gitRaja R Harinath2010-08-245-9/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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/7' of git://gitorious.org/svn2git/svn2git ↵Torgny Nyblom2010-08-181-1/+5
| |\ | | | | | | | | | into integration
| | * Allow comments (start with '#') in accounts mapJosé Manuel Santamaría Lema2010-06-211-1/+5
| | |
| * | Merge commit 'refs/merge-requests/5' of git://gitorious.org/svn2git/svn2git ↵Torgny Nyblom2010-08-181-1/+1
| |\ \ | | | | | | | | | | | | into integration
| | * | Add "-lapr-1 -lsvn_subr-1" to the linker options.José Manuel Santamaría Lema2010-06-051-1/+1
| | |/ | | | | | | | | | Linking against these libraries makes the program build using binutils gold.
| * | Merge commit 'refs/merge-requests/1' of ↵Torgny Nyblom2010-08-093-3/+3
| |\ \ | | | | | | | | | | | | git://gitorious.org/~marcguenther/svn2git/marcguenther-svn2git into integration
| | * | Fix broken utf-8 filenames.Pavel Plesov2010-05-181-1/+1
| | | |
| | * | Merge branch 'master' of gitorious.org:svn2git/svn2gitMarc Guenther2010-05-063-21/+55
| | |\ \ | | | |/
| | * | small typo in debug messageMarc Guenther2010-04-201-1/+1
| | | |
| | * | error message and exit when rules file cannot be readMarc Guenther2010-04-161-1/+1
| | | |
| * | | Exit if unable to open repositoryTorgny Nyblom2010-08-091-1/+4
| | | |
| * | | If a branch is created from a previous commit that doesn't touch the branch ↵Torgny Nyblom2010-08-092-9/+29
| | | | | | | | | | | | | | | | from path then fallback to using the latest version and issue a warning
| * | | Merge branch 'master' of git://gitorious.org/svn2git/svn2gitTorgny Nyblom2010-06-271-1/+1
| |\ \ \
| * | | | Save the exported marks along with the associated revisions for later use.Torgny Nyblom2010-05-181-0/+13
| | | | |
| * | | | Make git fast-import save the used marks and hashes for later use.Torgny Nyblom2010-05-181-1/+6
| | | | |
| * | | | Initialize lastmarkTorgny Nyblom2010-05-181-1/+1
| | | | |
| * | | | Add debugTorgny Nyblom2010-05-081-0/+1
| | |_|/ | |/| |
* | | | Provide a way to merge repositoriesRaja R Harinath2010-07-225-3/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose you have multiple repositories in SVN that you want to merge into a single one in GIT, it can get very messy to handle all the special-case rules. Instead, we introduce a new "forwarding repository" concept, which looks like repository subordinate repository unified prefix foo/ end repository This forwards all commits on the "subordinate" SVN tree to the "unified" GIT tree, with each file prefixed with "foo/".
* | | | Extract out public methods of Repository into an abstract base classRaja R Harinath2010-07-223-110/+154
| | | | | | | | | | | | | | | | Rename Repository to FastImportRepository. We will be introducing new types soon.
* | | | clear out a local that is re-usedRaja R Harinath2010-07-221-0/+5
| | | |
* | | | Move backup branches and tags to refs/branches/Raja R Harinath2010-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The naming scheme is refs/backups/r<svn-revision>/(heads|tags)/<branch> Where <svn-revision> is the revision where the branch is being reset: either for deletion or to be overwritten. We use a separate namespace so that we don't clutter up branch-name lists and tag lists with deleted tags. These refs will keep the commits alive as far as 'git gc' is concerned, but will be fairly unobstrusive otherwise.
* | | | Carve out Repository::markFrom from createBranch(), and noteCopyFromBranch()Raja R Harinath2010-07-212-43/+42
| | | | | | | | | | | | | | | | Put the slightly tricky qUpperBound logic in only one place.
* | | | Make Repository::createBranch use resetBranch now that they're similarRaja R Harinath2010-07-211-24/+1
| | | |
* | | | Re-arrange Repository::createBranch to be closer to resetBranchRaja R Harinath2010-07-211-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | While at it, make progress message for the "unknown from" case similar to the normal progress message. This ensures that any reconstructed branch data-structure will not lose any information.
* | | | Add a resetBranch() to help refactor createBranch and deleteBranch.Raja R Harinath2010-07-202-4/+13
| | | | | | | | | | | | | | | | Only deleteBranch uses it for now.
* | | | Remove exit(1) in createBranch. Return EXIT_SUCCESS/EXIT_FAILURE insteadRaja R Harinath2010-07-203-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Make the new incremental mode permanentRaja R Harinath2010-07-191-25/+21
| | | | | | | | | | | | | | | | | | | | With the changes made to Repository::reloadBranches when --incremental was introduced, the older mode wasn't working, anyway.
* | | | 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.
* | | | Make error handling of --incremental and --resume-from idempotentRaja R Harinath2010-07-113-19/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When --resume-from failed in incremental mode, the log files that detected the error condition were truncated. So, if the same command line was executed again, the invocation would go through. We now restore the log files from backup when we detect we're going to fail. The restored log files may not all be the same as we originally started with, but we only truncate information that would anyway be truncated on the next successful run.
* | | | make --incremental robust to inconsistent import directoriesRaja R Harinath2010-07-103-15/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An interrupted import (say with Ctrl-C) can leave the import directory in an inconsistent state. This can be due to checkpointing fast-import only occassionally, but updating log-* files immediately, and/or other reasons. The incremental mode can detect certain such situations and rewind back to a safe state. Note that since the default commit-interval is quite large, this rewind can end up backtracking a lot. Note also that import interrupted under the control of svn2git, say, for missing rules should leave the import directory in a consistent state for the purpose of svn2git.
* | | | Reduce size of fast-import marks file by not persisting file-level marksRaja R Harinath2010-07-102-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use two allocators for marks, one persistent commit counter that starts at 0 and counts up commits, and a transitional counter, for files, that counts down from maxMark, and is reset on each SVN revision. Note that the marks file will still have marks for some, but not all, files. The number of such marks is limited by the size of the SVN revision that affects the most files. For instance, this changed the size of one marks file from 19M to 3.2M. fast-import issues: We currently set maxMark = (1<<20)-1. Anything large seems to trigger a bug in the sparse array dumping routine in git-fast-import in certain versions of git.
* | | | Ensure deleteBranch() actually writes to git-fast-importRaja R Harinath2010-07-091-0/+1
| | | | | | | | | | | | | | | | Use startFastImport to start off the git-fast-import process if necessary.
* | | | Introduce incremental mode with --incremental flagRaja R Harinath2010-07-093-21/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the progress logs that we carefully maintained to recreate the branch data structures, as described in earlier commits. A major change/improvement is that reloadBranches() now uses the marks file and internal data structures to prime the fast-import rather than using git-rev-parse. We also handle --resume-from properly, by truncating the log file to revisions that only precede the revision resumed from. Note that git fast-import allows marks to be reused without any extra processing.
* | | | Handle SVN directory deletes that lead to branch deletesRaja R Harinath2010-07-083-23/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
* | | | Move SVN revision to fast-import mark mapping to the per-branch datastructure.Raja R Harinath2010-07-052-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | A single SVN revision can affect multiple branches in the same repository. Keeping track of only one mark per revision loses information and makes the history incorrect.
* | | | Properly implement the 16-parent limit, rather than conservatively stopping atRaja R Harinath2010-07-051-8/+8
| | | | | | | | | | | | | | | | 15 commit parents.
* | | | 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-013-54/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Exit with EXIT_FAILURE if svn.exportRevision() failedRaja R Harinath2010-07-011-4/+8
| | | |
* | | | Handle same branch copies using createBranch to allow reseatingRaja R Harinath2010-07-011-12/+12
| | | | | | | | | | | | | | | | branch tip to an older revision.
* | | | Add --force to 'git fast-import' command-lineRaja R Harinath2010-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we support arbitrarily reseating branches, the branch can be reset to older SVN revisions or derive from a different branch point. The "only fast-forward" rule of git branch imports gets in our way. Note that the application of the rule is fairly unpredictable since the checking happens only at 'checkpoint's. Let's trust our handling of SVN history and override the sanity-check. Note that we don't lose any information since reseated branches are snapshotted before reset.
* | | | Fix type errorRaja R Harinath2010-06-211-1/+1
| | | |
* | | | Improve progess logRaja R Harinath2010-06-201-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the progress log for commit and branch creation more uniform and machine parse-able. Add 'mark' information to log so that it can be cross-referenced against the fast-import marks file. The log-* files now have enough information in a convenient enough form that the export can eventually be made fully resumable and incremental. The format is essentially progress SVN r<svn-rev> branch <git-branch> = (:<mark> | <other-git-branch>) with a possible trailing # comment. Any line not matching this can be The incremental mode would prime the internal structures with if (<mark>) repository->commitMarks[<svn-rev>] = <mark>; repository->branches[<git-branch>].commits.append(<svn-rev>);