[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Converting a proprietary svn repository to git
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Converting a proprietary svn repository to git |
Date: |
Sat, 27 Feb 2016 21:28:52 +0100 |
On Sat, 27 Feb 2016 18:33:22 +0000 Greg Chicares <address@hidden> wrote:
GC> On 2016-02-27 15:23, Vadim Zeitlin wrote:
GC> > On Sat, 27 Feb 2016 02:11:51 +0000 Greg Chicares <address@hidden> wrote:
GC> [...]
GC> > GC> Let's compare the '--no-metadata' and '--msg-filter
msgfilter-rev2sha' results:
GC> > ...
GC> > GC> All the differences are in .git/ , and they seem to be just binary;
GC> > GC> the contents of {data/ src/ test/} are identical. I think I can
conclude
GC> > GC> that for this migration 'msgfilter-rev2sha' isn't beneficial.
GC> >
GC> > Err, I am not sure how do you make this conclusion, even if the result
may
GC> > well be true.
GC>
GC> Because I thought the script's job was to rewrite repository contents
GC> to refer to git hashes rather than svn revision numbers--and it made
GC> no such changes. But it seems I misunderstood completely:
It looks like I don't explain it well enough in my guide, but the purpose
of this script is to rewrite the references to the existing svn revisions
in the repository history. I.e. if you had a commit message "Update
personal data after the changes of r12345" in your svn repository, it now
becomes "Update personal data after the changes of abcdef" where the Git
SHA-1 "abcdef" corresponds to Subversion r12345.
IOW this script takes care of one of the drawbacks mentioned in git svn
documentation by updating the existing revision references which would
become out of date. It still doesn't replace them in the bug tracker and
the mailing list archives, this will have to wait for the next version, to
be written in Perl 6.
GC> > To see whether it's beneficial or not you should use "git log --grep=..."
GC> > with the regular expression at the end of the script. As you're not going
GC> > to have any 5 digit revision numbers (with only 237 revisions in total),
GC> > and as it's not a problem to get some false positives here, it should be
GC> > enough to run
GC> >
GC> > git log --grep='(r|rev\s*|revision\s*)([1-9][0-9]*)'
GC> >
GC> > and check if there any references you would like to replace.
GC>
GC> git log --grep='(r|rev\s*|revision\s*)([1-9][0-9]*)' | wc
GC> 0 0 0
GC>
GC> I guess that's a perl regex, which places it beyond my easy understanding;
Actually it's just a POSIX extended regexp which I use automatically
because I had done "git config grep.extendedRegexp true" a long time ago
and completely forgot about it, sorry. You need to add --extended-regexp
option to make it work without this config setting (or add bunch of
backslashes everywhere to turn it into a basic POSIX regexp).
Git does have --perl-regexp option too, of course, but we don't need such
power here.
Anyhow, I hope I could clear the confusion about the msgfilter-rev2sha
script, even if you still can't use it, but please let me know if I still
failed to do it.
VZ
- [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/25
- Re: [lmi] Converting a proprietary svn repository to git, Vadim Zeitlin, 2016/02/25
- Re: [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/26
- Re: [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/26
- Re: [lmi] Converting a proprietary svn repository to git, Vadim Zeitlin, 2016/02/27
- Re: [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/27
- Re: [lmi] Converting a proprietary svn repository to git,
Vadim Zeitlin <=
- Re: [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/27
Re: [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/29
Re: [lmi] Converting a proprietary svn repository to git, Greg Chicares, 2016/02/29