Skip to content
Snippets Groups Projects
  1. Mar 19, 2014
    • Mads Kiilerich's avatar
      config: set a 'source' in most cases where config don't come from file but code · 49f2d5644f04
      Mads Kiilerich authored
      Some extensions set configuration settings that showed up in 'hg showconfig
      --debug' with 'none' as source. That was confusing.
      
      Instead, they will now tell which extension they come from.
      
      This change tries to be consistent and specify a source everywhere - also where
      it perhaps is less relevant.
      49f2d5644f04
    • Mads Kiilerich's avatar
      config: don't set source when no source is specified - don't overwrite with '' · d19c9bdbbf35
      Mads Kiilerich authored
      This prevents ui.fixconfig from overwriting the source of paths and it will
      thus show up in showconfig --debug.
      d19c9bdbbf35
    • Mads Kiilerich's avatar
      config: give a useful hint of source for the most common command line settings · f144928dd058
      Mads Kiilerich authored
      'hg showconfig --debug' will instead of:
        none: ui.verbose=False
      give the better hint:
        --verbose: ui.verbose=False
      f144928dd058
    • Mads Kiilerich's avatar
    • Katsunori FUJIWARA's avatar
      mq: omit ".hgsubstate" from qnew/qrefresh target list for consistent node hash · d666da075b91
      Katsunori FUJIWARA authored
      Before this patch, even if specified file patterns and -I/-X options
      cause listing ".hgsubstate" up in the target list, qnew/qrefresh put
      ".hgsubstate" into the target list individually and forcibly.
      
      This changes how many times ".hgsubstate" appear in the target list
      according to run-time conditions, and causes inconsistent node hash,
      even though revision content is same, because node hash calculation
      uses the specified target list directly (without duplication check or
      so).
      
      This patch always omits ".hgsubstate" from qnew/qrefresh target list
      for consistent node hash.
      
      This omitting doesn't miss including ".hgsubstate" changes, because:
      
        - "localrepository.commit()" puts ".hgsubstate" into the target list
          for "commitctx()" forcibly if needed
      
        - "mq.putsubstate2changes()" puts ".hgsubstate" into the target list
          for "patch.diff()" if it is not yet listed up
      d666da075b91
    • Katsunori FUJIWARA's avatar
      qnew: omit meaningless and harmful putting subrepositories into target list · 7f7c8ef31c5d
      Katsunori FUJIWARA authored
      Before this patch, qnew puts updated subrepositories into target list
      forcibly, if any of -I, -X or patterns are specified.
      
      But this is meaningless and harmful, because:
      
        - putting subrepositories into target list doesn't affect the result
          of "localrepository.status()"
      
          "dirstate.status()" invoked via "localrepository.status()" always
          omits subrepositories from the result of it
      
        - any -I/-X opts and empty "pats" causes unexpected failure
      
          when any -I/-X opts are specified, "inclsubs" are always added to
          "pats", even if "pats" is empty.
      
          but this changes meaning of "pats" from "including all to be
          included" to "including only listed subrepositories"
      
          this may exclude ".hgsub" and cause unexpected exception raising
          ("can't commit subrepos without .hgsub" ).
      
        - qnew at other than repository root (with -I, -X or any patterns)
          causes unexpected failure
      
          "scmutil.match()" treats pattern without syntax type as 'relpath'
          type (= one rooted at cwd).
      
          but qnew puts subrepository paths rooted at the repository root,
          and it causes unexpected exception raising ("SUBREPO not under
          root ROOT" in "pathutil.canonpath()"), if "hg qnew" is executed at
          other than repository root with -I, -X or any patterns.
      
      This patch omits meaningless and harmful putting subrepositories into
      target list.
      
      This omitting doesn't miss including updated subrepositories, because
      subrepositories are specified to "scmutil.matchfiles()" directly, to
      get "match" object for "localrepository.commit()".
      7f7c8ef31c5d
  2. Mar 18, 2014
  3. Mar 16, 2014
  4. Mar 14, 2014
  5. Mar 12, 2014
    • Pierre-Yves David's avatar
      wireproto: move wireproto capabilities computation in a subfunction · 982f13bef503
      Pierre-Yves David authored
      It will help people that need to add capabilities (in a more subtle was that
      just adding some to the list) in multiple way:
      
      1. This function returns a list, not a string. Making it easier to look at,
         extend or alter the content.
      
      2. The original capabilities function will be store in the dictionary of wire
         protocol command. So extension that wrap this function also need to update
         the dictionary entry.
      
         Both wrapping and update of the dictionary entry are needed because the
         `hello` wire protocol use the function itself. This is specifically sneaky for
         extension writer as ssh use the `hello` command while http use the
         `capabilities` command.
      
         With this new `_capabilities` function there is one and only one obvious
         place to wrap when needed.
      982f13bef503
  6. Mar 11, 2014
  7. Mar 18, 2014
  8. Mar 17, 2014
    • Jordi Gutiérrez Hermoso's avatar
      commit: propagate --secret option to subrepos (issue4182) · 03774a2b6991
      Jordi Gutiérrez Hermoso authored
      Before this patch, `hg commit --secret` was not getting propagated
      correctly, and subrepos were not getting the commit in the secret
      phase. The problem is that subrepos get their ui from the base repo's
      baseui object and ignore the ui object passed on to them. This sets
      and restores both ui objects with the appropriate option.
      03774a2b6991
  9. Mar 18, 2014
    • Katsunori FUJIWARA's avatar
      amend: save commit message into ".hg/last-message.txt" · 434619dae569
      Katsunori FUJIWARA authored
      Before this patch, commit message (may be manually edited) for "commit
      --amend" is never saved into ".hg/last-message.txt", because it uses
      "localrepository.commitctx()" instead of "localrepository.commit()":
      saving into ".hg/last-message.txt" is executed only in the latter.
      
      This patch saves commit message for "commit --amend" into
      ".hg/last-message.txt" just after user editing.
      
      This is the simplest implementation to fix on stable. Editing and
      saving commit message for memctx should be centralized into the
      framework like "localrepository.commit()" with "editor" argument or so
      in the future.
      434619dae569
    • Katsunori FUJIWARA's avatar
      histedit: save manually edited commit message into ".hg/last-message.txt" · 5d22cadd1938
      Katsunori FUJIWARA authored
      Before this patch, manually edited commit message for "fold" command
      in histedit-ing is never saved into ".hg/last-message.txt", because it
      uses "localrepository.commitctx()" instead of
      "localrepository.commit()": saving into ".hg/last-message.txt" is
      executed only in the latter.
      
      This patch saves manually edited commit message for "fold" command in
      histedit-ing into ".hg/last-message.txt" just after user editing.
      
      This is the simplest implementation to fix on stable. Editing and
      saving commit message for memctx should be centralized into the
      framework like "localrepository.commit()" with "editor" argument or so
      in the future.
      5d22cadd1938
    • Katsunori FUJIWARA's avatar
      qfold: save manually edited commit message into ".hg/last-message.txt" · 1e686e55780c
      Katsunori FUJIWARA authored
      Before this patch, manually edited commit message for "hg qfold -e"
      isn't saved into ".hg/last-message.txt" until it is saved by
      "localrepository.savecommitmessage()" in "localrepository.commit()".
      
      This may lose such commit message, if unexpected exception is raised.
      
      This patch saves manually edited commit message for "hg qfold -e" into
      ".hg/last-message.txt" just after user editing. This patch doesn't
      save the message specified by -m/-l options as same as other commands.
      
      This is the simplest implementation to fix on stable. Editing and
      saving commit message should be centralized into the framework of
      "localrepository.commit()" with "editor" argument in the future.
      
      This patch uses repository wrapping class for exception raising before
      saving commit message in "localrepository.commit()" easily and
      certainly, because such exception requires corner case condition.
      1e686e55780c
    • Katsunori FUJIWARA's avatar
      qnew: save manually edited commit message into ".hg/last-message.txt" · 57d0c8c3b947
      Katsunori FUJIWARA authored
      Before this patch, manually edited commit message for "hg qnew -e"
      isn't saved into ".hg/last-message.txt" until it is saved by
      "localrepository.savecommitmessage()" in "localrepository.commit()".
      
      This may lose such commit message, if unexpected exception is raised.
      
      This patch saves manually edited commit message for "hg qnew -e" into
      ".hg/last-message.txt" just after user editing. This patch doesn't
      save the message specified by -m/-l options as same as other commands.
      
      This is the simplest implementation to fix on stable. Editing and
      saving commit message should be centralized into the framework of
      "localrepository.commit()" with "editor" argument in the future.
      
      This patch uses repository wrapping class for exception raising before
      saving commit message in "localrepository.commit()" easily and
      certainly, because such exception requires corner case condition.
      57d0c8c3b947
    • Katsunori FUJIWARA's avatar
      tag: save manually edited commit message into ".hg/last-message.txt" · bcfc4f625e57
      Katsunori FUJIWARA authored
      Before this patch, manually edited commit message for "hg tag -e"
      isn't saved into ".hg/last-message.txt" until it is saved by
      "localrepository.savecommitmessage()" in "localrepository.commit()".
      
      This may lose such commit message, if unexpected exception is raised.
      
      This patch saves manually edited commit message for "hg tag -e" into
      ".hg/last-message.txt" just after user editing. This patch doesn't
      save the message specified by -m option (-l is not supported for "hg
      tag") as same as other commands.
      
      This is the simplest implementation to fix on stable. Editing and
      saving commit message should be centralized into the framework of
      "localrepository.commit()" with "editor" argument in the future.
      bcfc4f625e57
    • Katsunori FUJIWARA's avatar
      rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse" · 95aab23a806b
      Katsunori FUJIWARA authored
      Before this patch, "rebase --collapse --edit" without "--message" and
      "--logfile" invokes editor twice unexpectedly:
      
        1. explicit "ui.edit()" invocation in rebase extension itself
      
        2. indirect invocation in "localrepository.commit()" with "editor =
           commitforceeditor" assigned by "--edit" option
      
      This patch uses indirect "commitforceeditor" invocation instead of
      "ui.edit()" for "--collapse" without "--message" and "--logfile" to:
      
        - suppress redundant the former invocation
        - ensure editor invocation even when "--edit" is not specified
      95aab23a806b
    • Katsunori FUJIWARA's avatar
      localrepo: save manually edited commit message as soon as possible · f042d4b263f4
      Katsunori FUJIWARA authored
      Before this patch, "localrepository.commit()" invokes specified
      "editor" to edit commit message manually, and saves it after checking
      sub-repositories.
      
      This may lose manually edited commit message, if unexpected exception
      is raised while checking (or commiting recursively) sub-repositories.
      
      This patch saves manually edited commit message as soon as possible.
      f042d4b263f4
  10. Mar 15, 2014
    • Andrej Shadura's avatar
      hgk: enable selected patch text on Windows · d9378bfa0af0
      Andrej Shadura authored
      
      Port a patch from gitk. Original description:
      
      On windows, mouse input follows the keyboard focus, so to allow selecting
      text from the patch canvas we must not shift focus back to the top level.
      This change has no negative impact on X, so we don't explicitly test
      for Win32 on this change. This provides similar selection capability
      as already available using X-Windows.
      
      Signed-off-by: default avatarMark Levedahl <mdl123@verizon.net>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      d9378bfa0af0
    • Andrej Shadura's avatar
      hgk: ignore ctrl-z as EOF on windows · 0132cbe30c41
      Andrej Shadura authored
      
      Port a patch from gitk. Original description:
      
      Cygwin's Tcl is configured to honor any occurence of ctrl-z as an
      end-of-file marker, while some commits in the git repository and possibly
      elsewhere include that character in the commit comment. This causes gitk
      ignore commit history following such a comment and incorrect graphs. This
      change affects only Windows as Tcl on other platforms already has
      eofchar == {}. This fixes problems noted by me and by Ray Lehtiniemi, and
      the fix was suggested by Shawn Pierce.
      
      Signed-off-by: default avatarMark Levedahl <mdl123@verizon.net>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      0132cbe30c41
  11. Mar 14, 2014
  12. Feb 18, 2014
    • Lucas Moscovicz's avatar
      revset: changed minrev and maxrev implementations to use ordered sets · f15ff553b762
      Lucas Moscovicz authored
      Performance Benchmarking:
      
      0) max(tip:0)
      1) min(0:tip)
      2) min(0::)
      
      b96cb15ec9e0 (2.9.1 release)
      
          0) ! wall 0.005699 comb 0.000000 user 0.000000 sys 0.000000 (best of 450)
          1) ! wall 0.005414 comb 0.010000 user 0.010000 sys 0.000000 (best of 493)
          2) ! wall 0.025951 comb 0.030000 user 0.030000 sys 0.000000 (best of 107)
      
      05267e6e94dd (public tip at submission time)
      
          0) ! wall 0.015177 comb 0.020000 user 0.020000 sys 0.000000 (best of 175)
          1) ! wall 0.014779 comb 0.010000 user 0.010000 sys 0.000000 (best of 189)
          2) ! wall 12.345179 comb 12.350000 user 12.350000 sys 0.000000 (best of 3)
      
      Current patches:
      
          0) ! wall 0.001911 comb 0.000000 user 0.000000 sys 0.000000 (best of 1357)
          1) ! wall 0.001943 comb 0.010000 user 0.010000 sys 0.000000 (best of 1406)
          2) ! wall 0.000405 comb 0.000000 user 0.000000 sys 0.000000 (best of 6761)
      f15ff553b762
  13. Mar 14, 2014
  14. Mar 13, 2014
Loading