A bit more verbose.
[parsecvs/imz-RCS2git-use-cases.git] / parseRCS-indep
blob2940d7174d1854427602255b9717c090ca3feb0a
1 #!/bin/bash
3 # $Id$
4 # Description:
5 # It translates RCS histories for individual files into Git as independent histories.
6 # I will manually merge the results of parseRCS-indep to form a good Git history of the tree
7 # (manual merging can give more sensible results than parsecvs in cases when CVS hasn't been used, but there are merely RCS histories).
8 #
9 # For example, as the first thing, I want to merge all the initial commits of each of the file in order to populate the tree initially,
10 # and only then, above the populated tree, I will merge further changes.
12 # Note: you can't use octopus merge for commits without a common ancestor
13 # (the RCS histories are like this), so you'll have to successively merge them;
14 # for example, to merge the tips of the RCS histories (to get approximately the
15 # same result as a plain parsecvs gives), you should do (after parseRCS-indep):
17 # for h in $(git heads-for-merge); do git merge "$h"; done
19 # Also have a look at what parseRCS-merging-init does; it does a merge without touching
20 # the working tree.
21 # In its tuen, it uses the helper script git-mread-and-commit.
22 # (So, by using it, you could do the same for the tips of the RCS histories if you want.)
24 # Author: Ivan Zakharyaschev imz at altlinux dot org, March 2009.
25 # I publish it under GPL (as parsecvs is published).
28 # Passes through the options to parsecvs.
30 # Fail on errors:
31 set -e
33 git init
35 for f in RCS/*; do
36 parsecvs-as-sidehist refs/remotes/"${f%%,v}" "$@" "$f"
37 done