File:  [NetBSD Developer Wiki] / wikisrc / mailing-lists / tech-repository.mdwn
Revision 1.6: download - view: text, annotated - select for diffs
Wed Jan 20 13:05:55 2010 UTC (13 years, 10 months ago) by wiki
Branches: MAIN
CVS tags: HEAD
web commit by spz

    1: ## Requirements
    2: 
    3: A list of requirements for a possible replacement for CVS as repo software for NetBSD and pkgsrc so we don't keep starting over listing these (and forgetting half) all of the time:
    4: 
    5: - the license would be nice to be BSDish, must be open source and free to use
    6: - the software should be includeable in NetBSD base without too much excess baggage
    7: - it should be possible to do development on old or small hardware
    8: - it must support automated updating of source trees
    9: - it must support branches
   10: - there should be a conversion for the present history (that actually works)
   11: - the resulting repository must not break easily
   12: - the software should be reasonably mature and reliable
   13: - checkout of a pkgsrc tree must be feasible on a 32MB system
   14: - checkout of a stable pkgsrc tree and then updating select package subdirs to the latest version of the main branch should be possible
   15: - lasting removal of legally tainted code must be possible
   16: 
   17: Please add/correct.
   18: 
   19: ***
   20: 
   21: ## Experiences in using the software
   22: 
   23: ### Experiences with git
   24: 
   25: please fill in
   26: 
   27: ### Experiences with Subversion
   28: 
   29: please fill in
   30: 
   31: ***
   32: 
   33: ## Conversion experiences
   34: 
   35: ### git
   36: 
   37: Conversion of all modules to git succeeded using fromcvs togit. The resulting git repository of src contains several errors where files have a wrong version (eg in hunt/Makefile the contents of the file on the vendor branch appear as tip of the master branch, which is quite wrong).
   38: There have been no reports of errors in the other modules; this may be due to a lack of testing.
   39: 
   40: ### hg
   41: 
   42: Conversion of src failed. Afair the rest worked when using Mercurial 1.3.*. Alas, fromcvs tohg is not compatible with Mercurial 1.4 which is in pkgsrc now and is the version to use with Python 2.6 (afair). Two identified problems:
   43: <pre>
   44:         self.ui = ui.ui(interactive = False)
   45: </pre>
   46: wants to be
   47: <pre>
   48:         self.ui = ui.ui()
   49:         self.ui.setconfig('ui', 'interactive', 'off')
   50: </pre>
   51: in /usr/pkg/share/fromcvs/tohg.py line 10 (easily fixed, obviously)
   52: and
   53: <pre>
   54:         n = self.hgrepo.commit(files = files,
   55:                                text = text,
   56:                                user = user,
   57:                                date = "%s 0" % date,
   58:                                p1 = p1,
   59:                                p2 = p2,
   60:                                extra = {'branch': branch})
   61: </pre>
   62: needs to be replaces with something that works with the 1.4 commit that looks like this:
   63: <pre>
   64:     def commit(self, text="", user=None, date=None, match=None, force=False,
   65:                editor=False, extra={}):
   66: </pre>
   67: which is where I remembered that I wasn't planning to learn Python this week.
   68: 
   69: Next try: hg convert on pkgsrc
   70: <pre>
   71: --- /usr/pkg/lib/python2.6/site-packages/hgext/convert/cvsps.py 2009-12-02 01:30:45.000000000 +0000
   72: +++ /tmp/cvsps.py       2010-01-20 12:52:11.000000000 +0000
   73: @@ -271,14 +271,14 @@
   74:                  tags[rev].append(match.group(1))
   75:                  branchmap[match.group(1)] = match.group(2)
   76:  
   77: -            elif re_31.match(line):
   78: +            elif re_31.match(line) and re_50.match(peek):
   79:                  state = 5
   80:              elif re_32.match(line):
   81:                  state = 0
   82:  
   83:          elif state == 4:
   84:              # expecting '------' separator before first revision
   85: -            if re_31.match(line):
   86: +            if re_31.match(line) and re_50.match(peek):
   87:                  state = 5
   88:              else:
   89:                  assert not re_32.match(line), _('must have at least '
   90: @@ -357,7 +357,7 @@
   91:  
   92:          elif state == 8:
   93:              # store commit log message
   94: -            if re_31.match(line):
   95: +            if re_31.match(line) and re_50.match(peek):
   96:                  state = 5
   97:                  store = True
   98:              elif re_32.match(line):
   99: </pre>
  100: helps it to cope with the output of cvs rlog -N -r1.66 pkgsrc/databases/rrdtool/Makefile (that's the easy one)
  101: but then it tries to parse the output of (eg) cvs rlog -N -r1.19 pkgsrc/graphics/dcraw/Makefile and it's not clear
  102: to me how it could hope to get that one right just from cvs rlog, and all alternatives are going to be rather tedious
  103: and I'm still not planning to learn Python this week.

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb