Skip to content
Snippets Groups Projects
  1. Feb 24, 2015
    • Thomas Arendsen Hein's avatar
      pull: print "pulling from foo" before accessing the other repo · eabe44ec5af5
      Thomas Arendsen Hein authored
      1. This is consistent with pushing.
      2. This allows to see the URL of the other repo in case accessing the repo
         fails, e.g. wrong ssh path or issues with the https certificate, without
         using --debug or showconfig paths.
      
      Additionally add test for this in the context of ssh with a wrong path.
      eabe44ec5af5
  2. Feb 19, 2015
    • Siddharth Agarwal's avatar
      error.LookupError: rename 'message' property to something else · dcfdfd63bde4
      Siddharth Agarwal authored
      At least some installs of Python 2.6+ complain with:
      
          mercurial/error.py:26: DeprecationWarning: BaseException.message has been
              deprecated as of Python 2.6
      
      This patch renames the property away from 'message' so that Python no longer
      complains.
      dcfdfd63bde4
    • Anton Shestakov's avatar
      hgweb: use introrev() for finding parents (issue4506) · 46d6cdfce4bf
      Anton Shestakov authored
      The issue is titled "filtered revision 'XXX' (not in 'served' subset)" and that
      is the error message you sometimes get when trying to look at a file (/file or
      /annotate) in hgweb. For example:
      
      http://hg.intevation.org/mercurial/crew/file/90cf454edd70/mercurial/cmdutil.py
      
      This happens when a parent revision for a file is hidden, thus it is
      not 'served' and isn't accessible in hgweb by default. When hgweb tries to
      access such changeset, it produces the error and HTTP status code 404.
      
      Another detail is that the parents() function, that is used in multiple places
      in hgweb, sometimes returned changesets that were obsoleted by the current
      changeset for the file. For example, when using rebase with evolve and rebasing
      a divergent changeset that introduces a file on top of current branch. Or
      grafting a change and making the new grafted changeset obsolete the source
      (shown in the test case). The result is the same - the obsoleted changeset was
      mistakingly returned from parents(), even though it's not a parent and the only
      link to the new changeset is an obsoletion marker (and rebase/graft metadata?
      not sure it matters).
      
      The problem is fixed by using introrev() instead of linkrev() for finding
      parents. This prevents parents() function from returning unrelated obsolete
      changesets.
      
      The test case prepares a separate repo because (afaict) all other test cases
      never reuse file names, so there are no files that were changed in multiple
      changesets. So no previously available files have obsolete changesets in their
      history.
      46d6cdfce4bf
  3. Feb 08, 2015
    • Matt Harbison's avatar
      subrepo: drop unused pattern initialization in hgsubrepo revert · 27b6d41aa029
      Matt Harbison authored
      This passed an empty list to filerevert() if '--all' was specified, otherwise
      the set of modified files.  But then filerevert() immediately switched this and
      reinitialized 'pats' to an empty list if '--all' was *not* specified.
      27b6d41aa029
    • Matt Harbison's avatar
      revert: display full subrepo output with --dry-run · afed5d2e7985
      Matt Harbison authored
      Since the point of --dry-run is to show what will happen, the output with and
      without it should agree.  And since revert wasn't being called on subrepos with
      --dry-run before, revert in the subrepo had to be defanged in this case.
      afed5d2e7985
    • Matt Harbison's avatar
      largefiles: don't warn when reverting a forgotten largefile · 79c2c29c71ae
      Matt Harbison authored
      Previously, when a largefile is forgotten and then reverted, a warning was
      issued:
      
         $ hg revert -R subrepo subrepo/large.txt
         file not managed: subrepo/large.txt (glob)
      
      This was purely cosmetic as the file itself actually was reverted.
      
      The problem was even with all of the matcher patching, the largefile pattern
      given on the command line wasn't converted to a standin because the standin was
      neither in ctx nor wctx.  This causes the named largefile to be added to the
      'names' dict in cmdutil.revert() in the repo walk at line 2550.  The warning was
      printed out when the 'names' dict is iterated, because the file was specified
      exactly.
      
      Since core revert recurses into subrepos and largefiles only overrides the
      revert method in commands.py, it doesn't work properly when reverting a subrepo.
      However, it still will recurse into the subrepo and call the installed matcher
      method, so lfdirstate is reopened for the current repo level to prevent any new
      problems.
      79c2c29c71ae
  4. Feb 07, 2015
  5. Feb 18, 2015
    • Durham Goode's avatar
      histedit: don't recreate state object · a2d869e22b5e
      Durham Goode authored
      Previously, the histedit state object was being recreated during continue/abort.
      This meant that the locks that were held on the original state object were not
      available to actions, which meant actions could not release the lock on the
      repository (like an 'exec' action would need to do).
      
      This affected our internal extension that added the 'exec' action.
      a2d869e22b5e
  6. Jan 10, 2015
  7. Feb 11, 2015
  8. Feb 09, 2015
    • Ryan McElroy's avatar
      extensions: allow extending command synopsis and docstring · 042d95beeee8
      Ryan McElroy authored
      Mercurial uses a synopsis string and the docstring of a command for the
      command's help output. Today  there is no way for an extension that adds
      functionality to a command to extend either of these help strings.
      
      This patch enables appending to both the doctring and the synopsis, and adds
      a test for this functionality. Example usage is shown in the test and is also
      described in the docstring of extensions.wrapcommand().
      042d95beeee8
  9. Jan 21, 2015
    • Mike Edgar's avatar
      revlog: _addrevision creates full-replace deltas based on censored revisions · eb2d41c6ec37
      Mike Edgar authored
      A delta against a censored revision is either received through exchange and
      written blindly to a revlog, or it is created by the revlog itself. This
      change ensures the latter process creates deltas which fully replace all
      data in a censored base using a single patch operation.
      
      Recipients of a delta against a censored base will verify that the delta is in
      this full-replace format. Other recipients will use the delta as normal.
      
      For background and broader design of the censorship feature, see:
      http://mercurial.selenic.com/wiki/CensorPlan
      eb2d41c6ec37
  10. Feb 06, 2015
  11. Feb 11, 2015
    • Martin von Zweigbergk's avatar
      test-merge-tools: fix flaky test by avoiding debugsetparents · 9d0b6ef92eb2
      Martin von Zweigbergk authored
      debugsetparents is a debug command and does not provide the same
      guarantees as non-debug commands do. In particular, when the user sets
      a different parent, any clean files will remain clean in the dirstate
      even though the new parent might have a different version of the file
      (so it should appear modified compared to the new parent). Let's
      instead achieve the same effect by updating to the new parent and
      reverting the contents back to what they were.
      
      This fix can be tested by passing '--config
      debug.dirstate.delaywrite=2' to the 'hg update' command in the
      beforemerge().
      9d0b6ef92eb2
  12. Feb 06, 2015
    • Mike Edgar's avatar
      revlog: in addgroup, reject ill-formed deltas based on censored nodes · a450e0a2ba0a
      Mike Edgar authored
      To ensure interoperability when clones disagree about which file nodes are
      censored, a restriction is made on deltas based on censored nodes. Any such
      delta must replace the full text of the base in a single patch.
      
      If the recipient of a delta considers the base to be censored and the delta
      is not in the expected form, the recipient must reject it, as it can't know
      if the source has also censored the base.
      
      For background and broader design of the censorship feature, see:
      http://mercurial.selenic.com/wiki/CensorPlan
      a450e0a2ba0a
  13. Jan 21, 2015
  14. Jan 23, 2015
  15. Feb 06, 2015
    • Mike Edgar's avatar
      filelog: allow censored files to contain padding data · 9cfd7c4f22f5
      Mike Edgar authored
      To ensure delta compatibility, when a revision is censored, it is
      padded to match the original data in size. The previous check does
      not allow for padding because it was added before padding was found
      to be a requirement.
      
      For more background and design of the censorship feature, see:
      mercurial.selenic.com/wiki/CensorPlan
      9cfd7c4f22f5
  16. Jan 08, 2015
  17. Feb 02, 2015
  18. Oct 02, 2014
    • Matt Harbison's avatar
      localrepo: don't reintroduce pruned tag entries when tagging · b08af8f0ac01
      Matt Harbison authored
      If a commit and a followup tag commit are pruned, there are no references to it
      in any non obsolete version of .hgtags.  Without this change however, the next
      time a tag is added to another branch, the obsolete references are appended in
      .hgtags before the new entries for the current tag command.
      
      The annotation to unfilter localrepo._tag() has been around since b3af182a1944.
      The log message for it mentions computing the tag cache though, so I'm not sure
      if this was misplaced?  It looks like branchmap was aware of filtering then, and
      now tracks a cache per view.
      b08af8f0ac01
  19. Feb 05, 2015
    • Mateusz Kwapich's avatar
      histedit: switch state to store node instead of ctx · 5d5ec4fb7ada
      Mateusz Kwapich authored
      Currently, if the node no longer exists, the state object fails to load
      and pukes with an exception. Changing the state object to only store the
      node allows callers to handle these cases.  For instance, in
      bootstrapcontinue we can now detect that the node doesn't exist and exit
      gracefully.
      
      The alternative is to have the state object store something like None
      when the node doesn't exist, but then outside callers won't be able to
      access the old node for recovery (unless we store both the node and the
      ctx, but why bother).
      
      More importantly it allows us to detect this case when doing hg histedit
      --abort.  Currently this situation results in both --continue and
      --abort being broken and the user has to rm .hg/histedit-state to unwedge
      their repo.
      (description by Durham Goode)
      5d5ec4fb7ada
  20. Jan 31, 2015
  21. Feb 07, 2015
  22. Jan 23, 2015
    • Martin von Zweigbergk's avatar
      trydiff: extract function that generates filename pairs · 9cf9432a505b
      Martin von Zweigbergk authored
      The code that identifies copies/renames, as well as the filenames
      before and after, is now isolated and we can extract it to a function
      so it can be overridden by extensions (in particular the narrow clone
      extension).
      9cf9432a505b
    • Martin von Zweigbergk's avatar
      trydiff: read file data in only one place · 0f8baebcdbea
      Martin von Zweigbergk authored
      This moves getfilectx() out of the initial block in the loop, leaving
      that block to be only about finding pairs of filenames in ctx1 and
      ctx2 to diff.
      0f8baebcdbea
    • Martin von Zweigbergk's avatar
      trydiff: set filename variables to None even when not opts.git or losedatafn · b6f434729b97
      Martin von Zweigbergk authored
      There is not much left of the first block "if opts.git or losedatafn"
      block now. The next patch will move the call to getfilectx() out of
      that block. We will then be using the defined-ness of 'f1' to tell
      whether the file existed in ctx1 (and under what name). We will need
      this information whether or not opts.git or losedatafn was set, so
      just remove that guard. The only operation in the block that is not
      cheap is the call to getfilectx(), but that has an extra 'if opts.git'
      guard already.
      
      --ignore-space-change proves that only 'if opts.git or losedatafn:'
        was removed.
      b6f434729b97
    • Martin von Zweigbergk's avatar
      trydiff: read flags in one place · c666c85f71ba
      Martin von Zweigbergk authored
      Now that we can trust f1/f2 to indicate whether that side of the diff
      exists, we can move the calls to ctx.flag() to a single place.
      c666c85f71ba
  23. Feb 06, 2015
  24. Jan 23, 2015
    • Martin von Zweigbergk's avatar
      trydiff: make filenames None when they don't exist · 1ea90d140ee3
      Martin von Zweigbergk authored
      f1 and f2 are currently set always set to some filename, even for
      added or deleted files. Let's instead set them to None to indicate
      that one side of the diff doesn't exist. This lets us use the filename
      variables instead of the content variables and simplify a bit since
      the empty string is not a valid filename. More importantly, it paves
      the way for further simplifications.
      1ea90d140ee3
  25. Feb 10, 2015
    • Augie Fackler's avatar
    • Gregory Szorc's avatar
      help.merge-tools: do not double document merge tools · be83fd9d46d5
      Gregory Szorc authored
      Merge tools were being double documented in help system output due
      to functions being defined under multiple names in the merge tools
      dictionary.
      
      Establish a new dictionary for just the tools to document and
      use it from the help system so we don't get double output.
      
      Double documentation likely plagues other auto-documented items
      as well. It might be a good idea to eventually compare function
      instances to filter out duplicate entries from dictionaries
      passed to ``makeitemsdoc``. However, without an easy way to break
      ties, this may result in some functions being advertised over
      their modern equivalents. This would be a noble patch series.
      But it isn't one this author is willing to tackle at this time.
      be83fd9d46d5
  26. Feb 09, 2015
    • Gregory Szorc's avatar
      help: teach topic symbols how to dedent · 067540702f64
      Gregory Szorc authored
      When using docstrings for documenting symbols such as revsets,
      templates, or hgweb commands, documentation likely has leading
      whitespace corresponding to the indentation from the Python source
      file.
      
      Up until this point, the help system stripped all leading and
      trailing whitespace and replaced it with 2 spaces of leading
      whitespace. There were a few bad side-effects. First, sections
      could not be used in docstrings because they would be indented
      and the rst parser would fail to parse them as sections. Also,
      any rst elements that required indentation would lose their
      indentation, again causing them to be parsed and rendered
      incorrectly.
      
      In this patch, we teach the topic symbols system how to dedent
      text properly. I argue this mode should be enabled by default.
      However, I stopped short of changing that because it would cause
      a lot of documentation reformatting to occur. I'm not sure if
      people are relying on or wanting indentation. So, dedenting has
      only been turned on for hgweb symbols. This decision should be
      scrutinized.
      067540702f64
  27. Feb 07, 2015
Loading