[darcs-users] Hang on pull

Tommy Pettersson ptp at lysator.liu.se
Wed Sep 22 18:43:24 UTC 2004


I have tried this approach, and it does not work very
well.  My thoughts about it is that it might just be too a
complex problem to solve in the general way darcs examines
(non)commutating patches.  Especially if the vendor has
included some of your changes in their new version there
will be conflicts on all those lines, and with non-commuting
patches on top of those patches and so on...


My solution is this:

 1)  Create a darcs patch from vendors old version to your current version
     (This will be a single patch that contains all changes you have made
      to vendors old version.)

      Detailed listing:
      a)  make branch of vendors old version (VOB)
      b)  make branch of your current version (YCB)
      c)  replace _darcs in YCB with link to _darcs in VOB
      d)  fix adds/removes and such (darcs what --look will help)
      e)  record (in YCB; patch will go by link to VOB _darcs)
      f)  cd to VOB and revert (to "apply" the changes sneaked into VOB _darcs)

 2)  Create a darcs patch from vendors old version to vendors new version
     (Well, you already did this, so you know how to do it.)

 3)  Merge those two patches (by pulling the upgrade patch from vendor to VOB)
     (This will only cause simple conflicts, so it won't take forever)

 4)  Fix conflicts

 5)  Record this version to your own repo, or a branch thereof if you are careful.
     (With a name like "merge vendor version x.x.x".)

      Detailed listing (similar to point 1):
      a)  replace _darcs in VOB with link to _darcs in your own repo
      b)  fix adds/removes and such
      c)  record
      c)  cd to your own record and "apply" by reverting
          !! DO NOT have any unrecorded changes in your repo !!

This will produce a single patch in your repo that adds all
changes from vendors new version but adjusted to your own
local version.  It won't cause any conflicts and thus no
mergers at all.


Dare I suggest a new feature for darcs, an à la tla woaha merge?  ;-)


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list