Skip to content
Snippets Groups Projects
  1. Nov 12, 2015
  2. Dec 01, 2015
    • Siddharth Agarwal's avatar
      filemerge: default regular prompts to 'leave unresolved' (BC) · 88d5db4b
      Siddharth Agarwal authored
      It makes far more sense to leave these conflicts unresolved and kick back to
      the user than to just assume that the local version be chosen. There are almost
      certainly buggy scripts and applications using Mercurial in the wild that do
      merges or rebases non-interactively, and then assume that if the operation
      succeeded there's nothing the user needs to pay attention to.
      88d5db4b
  3. Nov 30, 2015
  4. Nov 25, 2015
  5. Nov 28, 2015
  6. Dec 01, 2015
    • Laurent Charignon's avatar
      repair: use bookmarks.recordchange instead of bookmarks.write · 5f2e4eb0
      Laurent Charignon authored
      Before this patch we were using the deprecated bookmarks.write api. This
      patch replaces the call to bookmarks.write by a call to bookmarks.recordchange.
      We move the bookmark code above the code removing the undo file because with
      bookmarks.recordchange we have to create a transaction that would create an
      undo file.
      5f2e4eb0
    • Laurent Charignon's avatar
      commit: add amend mode for commit -i · 55fa7c39
      Laurent Charignon authored
      When I moved crecord into core, I didn't include the toggleAmend function (to
      switch from commit to amend mode). I did it because it would have made it more
      difficult to use record and crecord interchangably. This patch reintroduces the
      amend mode for commit -i as well as two tests to verify the behavior of the
      function.
      55fa7c39
    • Laurent Charignon's avatar
      commit: add a way to return more information from the chunkselector · 8d3c5797
      Laurent Charignon authored
      Before this patch, the chunkselector for record or crecord was used to return
      the list of hunks that were selected by the user. The goal of this series is to
      reintroduce the toggle amend feature for crecord. To do so, we need to be able
      to return more than just the selected hunks from the chunkselector but also
      the information: is amend mode toggled. This patch adds a new return value for
      chunkselectors that will be used to implement the toggle amend feature in
      crecord.
      8d3c5797
  7. Nov 21, 2015
  8. Nov 30, 2015
  9. Nov 29, 2015
  10. Nov 28, 2015
  11. Nov 25, 2015
  12. Nov 24, 2015
    • Gregory Szorc's avatar
      extensions: refuse to load extensions if minimum hg version not met · 060f83d2
      Gregory Szorc authored
      As the author of several 3rd party extensions, I frequently see bug
      reports from users attempting to run my extension with an old version
      of Mercurial that I no longer support in my extension. Oftentimes, the
      extension will import just fine. But as soon as we run extsetup(),
      reposetup(), or get into the guts of a wrapped function, we encounter
      an exception and abort. Today, Mercurial will print a message about
      extensions that don't have a "testedwith" declaring explicit
      compatibility with the current version.
      
      The existing mechanism is a good start. But it isn't as robust as I
      would like. Specifically, Mercurial assumes compatibility by default.
      This means extension authors must perform compatibility checking in
      their extsetup() or we wait and see if we encounter an abort at
      runtime. And, compatibility checking can involve a lot of code and
      lots of error checking. It's a lot of effort for extension authors.
      
      Oftentimes, extension authors know which versions of Mercurial there
      extension works on and more importantly where it is broken.
      
      This patch introduces a magic "minimumhgversion" attribute in
      extensions. When found, the extension loading mechanism will compare
      the declared version against the current Mercurial version. If the
      extension explicitly states we require a newer Mercurial version, a
      warning is printed and the extension isn't loaded beyond importing
      the Python module. This causes a graceful failure while alerting
      the user of the compatibility issue.
      
      I would be receptive to the idea of making the failure more fatal.
      However, care would need to be taken to not criple every hg command.
      e.g. the user may use `hg config` to fix the hgrc and if we aborted
      trying to run that, the user would effectively be locked out of `hg`!
      
      A potential future improvement to this functionality would be to catch
      ImportError for the extension/module and parse the source code for
      "minimumhgversion = 'XXX'" and do similar checking. This way we could
      give more information about why the extension failed to load.
      060f83d2
  13. Nov 25, 2015
  14. Oct 31, 2015
  15. Nov 25, 2015
    • Siddharth Agarwal's avatar
      merge: move almost all change/delete conflicts to resolve phase (BC) (API) · 25e4b2f0
      Siddharth Agarwal authored
      We have finally laid all the groundwork to make this happen.
      
      The only change/delete conflicts that haven't been moved are .hgsubstate
      conflicts. Those are trickier to deal with and well outside the scope of this
      series.
      
      We add comprehensive testing not just for the initial selections but also for
      re-resolves and all possible dirstate transitions caused by merge tools. That
      testing managed to shake out several bugs in the way we were handling dirstate
      transitions.
      
      The other test changes are because we now treat change/delete conflicts as
      proper merges, and increment the 'merged' counter rather than the 'updated'
      counter. I believe this is the right approach here.
      
      For third-party extensions, if they're interacting with filemerge code they
      might have to deal with an absentfilectx rather than a regular filectx.
      
      Still to come:
      - add a 'leave unresolved' option to merges
      - change the default for non-interactive change/delete conflicts to be 'leave
        unresolved'
      - add debug output to go alongside debug outputs for binary and symlink file
        merges
      25e4b2f0
    • Siddharth Agarwal's avatar
      test-merge-changedelete.t: print out debugmergestate · 29b08ca6
      Siddharth Agarwal authored
      We're going to use this to verify the merge state in upcoming patches.
      29b08ca6
    • Siddharth Agarwal's avatar
      debugmergestate: also recognize change/delete conflicts in the merge state · cc9d4916
      Siddharth Agarwal authored
      We're going to use this for tests in upcoming patches.
      cc9d4916
  16. Nov 30, 2015
  17. Nov 24, 2015
  18. Nov 30, 2015
    • Siddharth Agarwal's avatar
      merge: add a new action type representing files to add/mark as modified · d837da26
      Siddharth Agarwal authored
      This is somewhat different from the currently existing 'a' action, for the
      following case:
      
      - dirty working copy, with file 'fa' added and 'fm' modified
      - hg merge --force with a rev that neither has 'fa' nor 'fm'
      - for the change/delete conflicts we pick 'changed' for both 'fa' and 'fm'.
      
      In this case 'branchmerge' is true, but we need to distinguish between 'fa',
      which should ultimately be marked added, and 'fm', which should be marked
      modified.
      
      Our current strategy is to just not touch the dirstate at all. That works for
      now, but won't work once we move change/delete conflicts to the resolve phase.
      In that case we may perform repeated re-resolves, some of which might mark the
      file removed or remove the file from the dirstate. We'll need to re-add the
      file to the dirstate, and we need to be able to figure out whether we mark the
      file added or modified. That is what the new 'am' action lets us do.
      d837da26
    • Siddharth Agarwal's avatar
      mergestate: add a cached property accessor for the local context · 6f045b56
      Siddharth Agarwal authored
      This is going to be useful in an upcoming patch. We make this a public accessor
      because this is also going to be useful for custom merge drivers.
      6f045b56
    • Siddharth Agarwal's avatar
      mergestate: raise exception if otherctx is accessed but _other isn't set · 1bf1a7c3
      Siddharth Agarwal authored
      We don't want to inadvertently return the workingctx (self._repo[None]).
      1bf1a7c3
    • timeless's avatar
      pager: improve help for --pager= · efceacd6
      timeless authored
      try to clarify how to enable/disable the pager
      efceacd6
Loading