Diff for /wikisrc/mailing-lists/tech-repository.mdwn between versions 1.1 and 1.16

version 1.1, 2010/01/15 09:03:10 version 1.16, 2010/12/24 10:33:44
Line 10  A list of requirements for a possible re Line 10  A list of requirements for a possible re
 - there should be a conversion for the present history (that actually works)  - there should be a conversion for the present history (that actually works)
 - the resulting repository must not break easily  - the resulting repository must not break easily
 - the software should be reasonably mature and reliable  - the software should be reasonably mature and reliable
   - checkout of a pkgsrc tree must be feasible on a 32MB system
   - checkout of a stable pkgsrc tree and then updating select package subdirs to the latest version of the main branch should be possible
   - lasting removal of legally tainted code must be possible
   
 Please add/correct.  Please add/correct.
   
 ***  ***
   
   ## Experiences in using the software
   
   ### Experiences with Fossil
   
   #### Aleksej Saushev (asau)
   
   I started using it before conversion tool were available
   (basically it isn't available yet, to my knowledge Joerg is working on it),
   in addition I wanted to start as soon as possible
   and to try operation with no conversion tool available.
   Thus I've tried to simulate working with "vendor branches".
   
   For now Fossil lacks some essential features and has other severe problems:
   
   1. Many operations require javascript-capable web browser.
   1. No support for vendor branches.
   * Redundant to "There's no support for importing vendor source"?
   * No, it is different. I would import manually, if only some support were there.
   1. It is impossible to merge between trees growing from the very root.
   The initial commit is too special, this prevents using these trees for vendor branches.
   * Fixed in [4e3cd6ce4e].
   * 2010-11-08, not in pkgsrc.
   1. There's no support for importing vendor source,
   even "addremove" command isn't in trunk at the time of writing.
   * It has been merged to trunk and is part of the pkgsrc version.
   * No, it isn't part of pkgsrc version at the moment, TIAS.
   * Sorry, you are right. Merged to trunk in [ceab53718f].
   1. Merge state sticks. You can't undo it.
   * Not sure what you mean, but "revert" resets the merge state since [d13054ce84].
   * This is quite recent (late October) fix, I didn't check it.
   1. You can't amend your source when you've just merged, you are forced to commit after merge.
   * To clarify, the merge has to be committed first, no separate commits are possible from the checkout before that.
   * In practice this makes _critical_ defect in combination of "fossil diff" inability to generate difference for added files.
   1. You can't tune diff command to ignore RCS keywords.
   * Since RCS keywords are not really a native command, it is no surprise. An external diff program can be used for this purpose though.
   * Since there's no external diff program that supports it, it is really not quite easy.
   1. You can't diff single file between two given versions.
   * diff --from version1 --to version2 path/to/file
   * That didn't work, and I'm not sure it works now. It used to ignore path-to-file argument. (It used to bail out when both "--from" and "--to" were used.)
   1. There's no way to change commit messages.
   * easily done via ui: select a commit and under "Other Links" you can find "Edit" (given the necessary permissions).
   * How? It should be possible via command line nevertheless.
   1. There's no documented way to select commit messages of current branch, or branch by given commit id.
   Or there's a bug preventing it.
   * fossil info <commitid>
   * This isn't about "info" command, it is about "timeline"
   --> Please clarify what you mean.
   * BTW, this command doesn't support "-R" flag, perhaps you have to check the source out to use it.
   1. Commands are under-documented, usage messages don't list many available options.
   This applies to trunk at least, there's a branch that states documentation as its goal.
   1. There's no convenient way to look at commit contents: files affected, diff.
   * fossil ui and use a web browser
   * We don't have web browser in base system, this information should be accessible with command line.
   
   
   Some of above problems are reported.
   
   Note, all problems above are usability problems, I didn't explore e.g. scalability,
   Joerg did and had problems, but this is another story.
   
   ### Experiences with git
   
   Experience with the imported repositories on morden:
   
   - no problem in principle with the smaller modules like othersrc or htdocs (CVS tags are one off but that is expected)
   - the large repos are really fragile, and gits idea of how to fix a broken repo seems to be to retrieve a copy from someone/somewhere that happens to not be broken
   
   ### Experiences with Subversion
   
   please fill in
   
   ### Experiences with Bazaar
   
   #### Jonathan Perkin (sketch)
   
   We use bzr at work (MySQL), and while it has a number of problems, it does make dev work easy.
   
   The Good
   
   * easy to use
   * shared repositories keep local disk usage down
   * commercial backing (Canonical)
   * cross-platform (works on Windows)
   * numerous GUI available
   
   The Bad:
   
   * slow
   * requires python
   
   The Ugly:
   
   * can be really slow
   * changing repository formats is a hassle
   
   A basic example workflow
   
   <pre>
   # create a local shared repository. all objects are held in a .bzr sub-directory, with branches essentially a lightweight checkout
   $ bzr init-repo bzr
   $ cd bzr
   
   # fetch HEAD, will take a long time, depending on connectivity
   $ bzr branch bzr+ssh://bzr.netbsd.org/netbsd-trunk
   
   # fetch netbsd-5, as we already have the majority of the code in netbsd-trunk (and therefore .bzr), this takes a fraction of the time
   $ bzr branch bzr+ssh://bzr.netbsd.org//netbsd-5
   
   # ok, let's do some dev work
   $ bzr branch netbsd-trunk netbsd-trunk-sketch-fix-msk
   $ cd netbsd-trunk-sketch-fix-msk; hack hack hack
   
   # the usual cycle of hack/commit/merge
   $ bzr diff # show uncommitted diffs
   $ bzr commit # commit to local clone
   $ bzr merge ../netbsd-trunk # update clone to latest local trunk, OR
   $ bzr merge bzr+ssh://bzr.netbsd.org/netbsd-trunk # merge directly from upstream
   
   # publish our tree for others to review/hack on
   $ bzr push bzr+ssh://bzr.netbsd.org/netbsd-trunk-fix-msk
   
   # got reviewed/tested, let's push it
   $ bzr merge bzr+ssh://bzr.netbsd.org/netbsd-trunk
   $ bzr missing bzr+ssh://bzr.netbsd.org/netbsd-trunk # show changeset differences
   $ bzr push bzr+ssh://bzr.netbsd.org/netbsd-trunk
   </pre>
   
   I personally find this approach a lot more natural than git's way of managing branches itself inside a single working directory.
   
   ***
   
 ## Conversion experiences  ## Conversion experiences
   
 to be filled in later  ### git
   
   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).
   There have been no reports of errors in the other modules; this may be due to a lack of testing.
   
   ### hg
   
   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:
   <pre>
           self.ui = ui.ui(interactive = False)
   </pre>
   wants to be
   <pre>
           self.ui = ui.ui()
           self.ui.setconfig('ui', 'interactive', 'off')
   </pre>
   in /usr/pkg/share/fromcvs/tohg.py line 10 (easily fixed, obviously)
   and
   <pre>
           n = self.hgrepo.commit(files = files,
                                  text = text,
                                  user = user,
                                  date = "%s 0" % date,
                                  p1 = p1,
                                  p2 = p2,
                                  extra = {'branch': branch})
   </pre>
   needs to be replaces with something that works with the 1.4 commit that looks like this:
   <pre>
       def commit(self, text="", user=None, date=None, match=None, force=False,
                  editor=False, extra={}):
   </pre>
   which is where I remembered that I wasn't planning to learn Python this week.
   
   Next try: hg convert on pkgsrc
   <pre>
   --- /usr/pkg/lib/python2.6/site-packages/hgext/convert/cvsps.py 2009-12-02 01:30:45.000000000 +0000
   +++ /tmp/cvsps.py       2010-01-20 12:52:11.000000000 +0000
   @@ -271,14 +271,14 @@
                    tags[rev].append(match.group(1))
                    branchmap[match.group(1)] = match.group(2)
    
   -            elif re_31.match(line):
   +            elif re_31.match(line) and re_50.match(peek):
                    state = 5
                elif re_32.match(line):
                    state = 0
    
            elif state == 4:
                # expecting '------' separator before first revision
   -            if re_31.match(line):
   +            if re_31.match(line) and re_50.match(peek):
                    state = 5
                else:
                    assert not re_32.match(line), _('must have at least '
   @@ -357,7 +357,7 @@
    
            elif state == 8:
                # store commit log message
   -            if re_31.match(line):
   +            if re_31.match(line) and re_50.match(peek):
                    state = 5
                    store = True
                elif re_32.match(line):
   </pre>
   helps it to cope with the output of cvs rlog -N -r1.66 pkgsrc/databases/rrdtool/Makefile (that's the easy one)
   but then it tries to parse the output of (eg) cvs rlog -N -r1.19 pkgsrc/graphics/dcraw/Makefile and it's not clear
   to me how it could hope to get that one right just from cvs rlog, and all alternatives are going to be rather tedious
   and I'm still not planning to learn Python this week. If you feel more energetic, feel free to hand over patches.

Removed from v.1.1  
changed lines
  Added in v.1.16


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