[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

'svn merge' interface

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-04-03 00:08:09 CEST

So I've searched the mail archives for our discussion about exactly what
the interface to 'svn merge' should be, but can't seem to find it. Can
anyone else?

Here are my thoughts about the interfaces to 'svn diff' and 'svn
merge'. They're very similar, and share a lot of code. The main
difference is that 'svn diff' just dumps diffs to your screen, while
'svn merge' uses the same fulltexts to do a 3-way merge into your
working file.

Here are my notes, hopefully they're clear to the list. The sections
marked "XXX" are the problem areas. I'd appreciate some ideas on
these. Right now

 * USES of 'svn diff':

  - usecase #1: purely local:

                 svn diff wcpath

     Compares working files to text-bases, revealing local mods only.

  - usecase #2: dry-run update:
      
                 svn diff wcpath -r N

     Client reports state, server drives an update through a
diff-editor. The diff-editor shows diffs that *would* be appiled to
text-bases.

  - usecase #3: pure repository-side diff:

                 svn diff <location> -r N:M

     Two versions of the same fs path are diffed on server, diffs
displayed.

     A. no wc required: svn diff URL -r N:M
     B. wcpath converted to URL: svn diff wcpath -r N:M

 * USES of 'svn merge':

  - usecase #1: dry-run update:

                 svn merge wcpath -r N

     Client reports state, server drives an update through a
     diff-editor. The diff-editor merges changes into working copy,
     but unlike a regular update, no .svn/ data (i.e. working
     revisions) are changed. Everything is just a local mod.

        XXX Doesn't work yet, but only for stupid reasons, not
theoretical.

  - usecase #2: pure repository-side diff:

                 svn merge <location> -r N:M

     Two versions of the same fs path are diffed on server, and
     diff-editor applies 3-way merge to working files, resulting in
     local mods.

     A. no wc required: svn merge URL -r N:M
        XXX Syntax problem: to what wcpath should the merge be
applied??

     B. wcpath converted to URL: svn merge wcpath -r N:M
        wcpath is also doubling as the place to which the merge is
applied.

  - usecase #3: merging an arbitrary changeset:

                svn merge URL1 -r N URL2 -r M

        XXX Do we want to allow this? I say yes. Flexibility.

        XXX Syntax problem: how do we specify two independent revs?
        XXX Syntax problem: to what wcpath should the merge be applied?

Received on Wed Apr 3 00:11:51 2002

This is an archived mail posted to the Subversion Dev mailing list.