Skip to content
Snippets Groups Projects
  1. Apr 30, 2013
    • Pierre-Yves David's avatar
      push: make locking of source optional (issue3684) · 3f5e75c2
      Pierre-Yves David authored
      Having the permission to lock the source repo on push is now optional. When the
      repo cannot be locked, phase are not changed locally. A status message is issue
      when some actual phase movement are skipped:
      
          cannot lock source repo, skipping local public phase update
      
      A debug message with the exact reason of the locking failure is issued in all
      case.
      3f5e75c2
    • Pierre-Yves David's avatar
      push: factorise phase movement in a simple closure · 0e4af72c
      Pierre-Yves David authored
      Having all phases movement centralised will help to handle special case when the
      local repo can not be locked as describe in issue 3684.
      0e4af72c
  2. Apr 29, 2013
    • Katsunori FUJIWARA's avatar
      merge: increase safety of parallel updating/removing on icasefs · 5cc71484
      Katsunori FUJIWARA authored
      "merge.applyupdates()" sorts "actions" in removal first order, and
      "workeractions" derived from it should be also sorted.
      
      If each actions in "workeractions" are executed in serial, this
      sorting ensures that merging/updating process is collision free,
      because updating the file in target context is always executed after
      removing the existing file which causes case-folding collision against
      the former.
      
      In the other hand, if each actions are executed in parallel, updating
      on a worker process may be executed before removing on another worker
      process, because "worker.partition()" partitions list of actions
      regardless of type of each actions.
      
      This patch divides "workeractions" into removing and updating, and
      executes the former first.
      
      This patch still scans "actions"/"workeractions" some times for ease
      of patch review, even though large list may cost much in this way.
      (total cost should be as same as before)
      
      This also changes some tests, because dividing "workeractions" affects
      progress indication.
      5cc71484
  3. Apr 30, 2013
    • Pierre-Yves David's avatar
      hgweb: handle filtered "0" rev in navigation · fc1b77db
      Pierre-Yves David authored
      Before this changeset, navigation generation crashed if revision "0" was
      filtered. We introduce a `_first` methods on revision navigation that return the
      lowest unfiltered element and use it in two place were the "0" changeset was
      explicitly referenced.
      
      Test case are introduced.
      fc1b77db
    • Pierre-Yves David's avatar
      hgweb: fix empty navigation detection · 6f27efc7
      Pierre-Yves David authored
      For some obscure reason, changelog.node(0) returns nullid if changelog is empty.
      this break empty navigation detection. We fix this code by using the length of
      the changelog.
      
      Using the length have some issue with revision filtering but this is a small
      step in the right direction. Proper fix comes in later changeset.
      6f27efc7
    • Jim Hague's avatar
      tests: AIX can't handle negative date in test-dirstate.t · 8c560ad1
      Jim Hague authored
      test-dirstate.t fails on AIX in the absurd date test. AIX touch errors on
      any date prior to 1970. AIX mktime() gives an error on such dates, so the
      problem is deeper than touch and attempts to work around touch in Python
      failed.
      
      Give up. Add an AIX test to hghave and skip the absurd date test on AIX.
      8c560ad1
  4. Apr 25, 2013
    • Katsunori FUJIWARA's avatar
      win32: use explicit path to "python.exe" only if it exists · f01a351d
      Katsunori FUJIWARA authored
      Before this patch, "hg.bat" for Windows environment always uses
      "%~dp0..\python" as explicit path to "python.exe".
      
      This path may not be valid in some cases.
      
      For example, on the environment using "virtualenv" python package,
      both "python.exe" and "hg.bat" are placed in the same directory.  In
      this case, "python.exe" should be found on PATH, because virtualenv
      activation script puts "python.exe" on the PATH.
      
      This patch uses explicit path to "python.exe" only if it exists, and
      expects that "python.exe" can be found on PATH otherwise.
      f01a351d
  5. Apr 27, 2013
  6. Apr 26, 2013
    • Mads Kiilerich's avatar
    • Mads Kiilerich's avatar
      largefiles: drop repo wrapping detection · ce4472b2
      Mads Kiilerich authored
      After 257afe5489d4 I see:
      
        $ hg id -q
        largefiles: repo method 'commit' appears to have already been wrapped by another extension: largefiles may behave incorrectly
        largefiles: repo method 'push' appears to have already been wrapped by another extension: largefiles may behave incorrectly
        be207d9b7e4b
      
      The warning is bad:
      
      * The message gives no hint what the problem is and how it can be resolved.
        The message is useless.
      
      * Largefiles do have its share of problems, but I don't think I ever have seen
        a problem where this warning would have helped. The 'may' in the warning
        seems like an exaggeration of the risk. Having largefiles enabled in
        combination with for instance mq, hggit and hgsubversion causes a warning
        (depending on the configuration order) but do not cause problems. Extensions
        might of course be incompatible, but they can be that in many other ways.
        The check and the message are incorrect.
      
      It would thus be better to remove the check and the warning completely.
      
      Before 257afe5489d4 the check always failed. That change made the check work
      more like intended ... but the intention was wrong. This change will thus also
      back that change out.
      ce4472b2
    • Katsunori FUJIWARA's avatar
      config: discard "%unset" values defined in the other files read in previously · 7d82ad4b
      Katsunori FUJIWARA authored
      Before this patch, "%unset" can't unset values defined in the other
      files read in previously, even though online help document says that
      it can. It can unset only values defined in the same configuration
      file.
      
      For example, the value defined in "~/.hgrc" can't be unset by "%unset"
      in ".hg/hgrc" of the repository.
      
      This patch records "%unset"-ed values in "config.parse()", and
      discards corresponding values in "config.update()".
      7d82ad4b
    • Katsunori FUJIWARA's avatar
      tests: rename from test-config-case.t to test-config.t for centralization · 8fb8dce3
      Katsunori FUJIWARA authored
      Before this patch, there is no test script testing configuration
      handling generally. "test-config-case.t" seems to be specific for
      testing case sensitive configuration.
      
      This patch renames from "test-config-case.t" to "test-config.t" for
      centralization of tests around configuration handling.
      8fb8dce3
  7. Apr 25, 2013
    • Katsunori FUJIWARA's avatar
      i18n: show the non-ASCII password prompt text correctly · be207d9b
      Katsunori FUJIWARA authored
      Before this patch, the prompt text for asking password is directly
      passed to "getpass.getpass()" of Python standard library.
      
      In "getpass.getpass()" implementation on Windows environment, the
      prompt text is split into byte sequence and "msvcrt.putch()" is
      applied on each bytes in it. This splitting causes non-ASCII prompt
      text to be broken.
      
      This patch shows the prompt text for asking password on "ui.getpass()"
      side, and invokes "getpass.getpass()" with empty prompt text. This
      prevents non-ASCII prompt text from being broken in
      "getpass.getpass()" implementation.
      
      This patch also sets "ui.prompt" label to prompt text to follow
      "ui.prompt()" style.
      be207d9b
  8. Apr 23, 2013
    • Kevin Bullock's avatar
      tests: make sed usage in test-unionrepo.t cross-platform · 70675d77
      Kevin Bullock authored
      Usage of the 'i' command proves tricky. I tried to write a check-code rule, but
      failed.
      70675d77
    • Kevin Bullock's avatar
      check-code: fix sed 'i' command rule newline matching · 12f15e4b
      Kevin Bullock authored
      The regular expression was meant to match cases where an 'i' command was
      not followed by precisely a '\' and then a newline; it failed to match
      the newline, so cases with a '\' but no newline would erroneously pass.
      12f15e4b
    • Durham Goode's avatar
      blackbox: don't run permission tests on non-unix systems · 63dda3c3
      Durham Goode authored
      The windows and vfat test runs were failing due to read/write permissions not
      working the same on those systems.  On vfat, permissions can't be changed
      at all, and on windows it seems the chmod emulation doesn't remove read
      permissions.  We could theoretically get the 'cannot write to blacklog.log'
      test to pass on windows but there's no #if condition to let us exclude vfat
      only.
      
      Verified that test-blackbox passes on windows now.
      63dda3c3
  9. Apr 22, 2013
  10. Apr 21, 2013
  11. Apr 20, 2013
  12. Apr 19, 2013
  13. Apr 18, 2013
    • Bryan O'Sullivan's avatar
      blackbox: automatically rotate log files · 2cad301a
      Bryan O'Sullivan authored
      If enabled, log rotation prevents the amount of space used by the
      blackbox log from growing without bound. This becomes important in
      cases where there are a lot of busy repositories managed by humans
      and automation on many machines.
      
      In large deployments, we cannot reasonably track all the repos where
      blackbox logs need to be managed, so it is safer to have blackbox
      manage its own logs than to move responsibility to an external tool
      such as logrotate.
      
      This change adds two configuration keys:
      
      * blackbox.maxsize is the maximum allowable size of the current log
      
      * blackbox.maxfiles is the number of log files to maintain
      2cad301a
    • Bryan O'Sullivan's avatar
      ui: add a configbytes method, for space configuration · 2c4cd1c4
      Bryan O'Sullivan authored
      This accepts a floating point number, followed by optional whitespace,
      followed by an optional one- or two-letter unit specifier (for
      bytes, kilobytes, megabytes, or gigabytes).
      2c4cd1c4
    • Simon Heimberg's avatar
      mq: do not inherit settings form base repo in mqrepo (Fixes issue2358) · 743daa60
      Simon Heimberg authored
      This is done by using repo.baseui when creating the queue repo.
      743daa60
    • Simon Heimberg's avatar
      color: set the ui class in reposetup, before a repo is created · 7ae12ce8
      Simon Heimberg authored
      Previously only the class of repo.ui was set. The class was set in the wrapper
      of dispatch._runcommand. But this is called after the repo is created. Only
      the class of repo.ui is set because repo.baseui already exists and is not
      accessible.
      We now set the class in uisetup because this is called before repo creation.
      This is also the place suggested in the wiki for modifying classes.
      7ae12ce8
    • André Sintzoff's avatar
      parsers: remove warning: format ‘%ld’ expects argument of type ‘long int’ · 365b0de1
      André Sintzoff authored
      gcc 4.6.3 on 12.04 Ubuntu machine emits warnings:
      mercurial/parsers.c: In function ‘find_deepest’:
      mercurial/parsers.c:1288:9: warning: format ‘%ld’ expects argument of type
                          ‘long int’, but argument 3 has type ‘Py_ssize_t’ [-Wformat]
      mercurial/parsers.c:1288:9: warning: format ‘%ld’ expects argument of type
                          ‘long int’, but argument 4 has type ‘Py_ssize_t’ [-Wformat]
      365b0de1
    • Katsunori FUJIWARA's avatar
      annotate: discard refcount of discarded annotation for memory efficiency · 36067f5b
      Katsunori FUJIWARA authored
      Before this patch, refcount (managed in "needed") of the annotation
      result is kept as 1, even if corresponding annotation result is
      discarded from "hist", because it isn't decreased and discarded.
      
      In the history tree including merging revision, the most recent common
      ancestor of merged revisions is scanned twice. Refcount of such
      ancestor never becomes 0, because refcount is started from 1 at the
      second scanning.
      
      This prevents annotation results of merging revision in "hist" from
      being discarded, and decreases memory efficiency.
      
      This patch discards refcount of the annotation result, when the
      corresponding annotation is discarded from "hist".
      36067f5b
    • Alexander Plavin's avatar
      revlog: fix a regression with null revision · c010cb6f
      Alexander Plavin authored
      Introduced in the patch which fixes issue3497
      Part of that patch was erroneously submitted and it shouldn't be in the code
      c010cb6f
    • Siddharth Agarwal's avatar
      rebase: check no-op before checking phase (issue3891) · 53eadcb8
      Siddharth Agarwal authored
      This could lead to user confusion, because phases aren't really involved at
      all when attempting to perform a no-op rebase.
      53eadcb8
  14. Apr 11, 2013
Loading