Skip to content
Snippets Groups Projects
  1. May 04, 2013
    • Matt Mackall's avatar
      hfs+: rewrite percent-escaper (issue3918) · af3b6515
      Matt Mackall authored
      The original code was a bit too clever and got confused by some cp949
      Korean text. This rewrite bytes the bullet and manually decodes UTF-8
      sequences. Adds some doctests.
      af3b6515
  2. May 03, 2013
    • Bryan O'Sullivan's avatar
      revert: ensure that copies and renames are honored (issue3920) · bd19587a
      Bryan O'Sullivan authored
      Previously, we restored the states of files, but not the additional
      information the dirstate uses to track copies and renames.
      bd19587a
    • Durham Goode's avatar
      hgignore: fix regression with hgignore directory matches (issue3921) · f4930b53
      Durham Goode authored
      If a directory matched a regex in hgignore but the files inside the directory
      did not match the regex, they would appear as deleted in hg status. This
      change fixes them to appear normally in hg status.
      
      Removing the ignore(nf) conditional here is ok because it just means we might
      stat more files than we had before. My testing on a large repo shows this
      causes no performance regression since the only additional files being stat'd
      are the ones that are missing (i.e. status=!), which are generally rare.
      f4930b53
  3. May 02, 2013
  4. May 01, 2013
  5. Apr 30, 2013
    • Katsunori FUJIWARA's avatar
      tags: update tag type only if tag node is updated (issue3911) · cb95716d
      Katsunori FUJIWARA authored
      Before this patch, tag type information is always updated, even if tag
      previously read in has higher priority than one newly read in.
      
      This causes that the tag type is displayed as "local", even if global
      tag overwrites existing local one successfully.
      
      This patch updates tag type only if tag node is updated.
      
      This patch tests overwriting local tags below:
      
        - visible one (normal case)
        - already removed one (recorded as null)
      cb95716d
  6. Apr 29, 2013
    • Mads Kiilerich's avatar
      match: fix root calculation for combining regexps with simple paths · fcf08023
      Mads Kiilerich authored
      The fall-back root for walking is the repo root, not no root.
      
      The "roots" do however also end up in m.files() which is used in various ways,
      for instance to indicate whether matches are exact. The change could thus have
      other impacts.
      fcf08023
    • Katsunori FUJIWARA's avatar
      icasefs: enhance test to prevent regression by changes in the future · 3d0dd890
      Katsunori FUJIWARA authored
      This patch adds steps to test case-folding collision detection on the
      revision tree built up in the order different from the one reproducing
      issue3452.
      
      This may prevent regression by changes around "copy detection" and/or
      "case-folding collision detection" logic in the future.
      3d0dd890
    • Katsunori FUJIWARA's avatar
      icasefs: rewrite case-folding collision detection (issue3452) · c60a7f5a
      Katsunori FUJIWARA authored
      Before this patch, case-folding collision detection uses
      "copies.pathcopies()" before "manifestmerge()", and is not aware of
      renaming in some cases.
      
      For example, in the case of issue3452, "copies.pathcopies()" can't
      detect renaming, if the file is renamed at the revision before common
      ancestor of merging. So, "hg merge" is aborted unexpectedly on case
      insensitive filesystem.
      
      This patch fully rewrites case-folding collision detection, and
      relocate it into "manifestmerge()".
      
      New implementation uses list of actions held in "actions" and
      "prompts" to build provisional merged manifest up.
      
      Provisional merged manifest should be correct, if actions required to
      build merge result up in working directory are listed up in "actions"
      and "prompts" correctly.
      
      This patch checks case-folding collision still before prompting for
      merge, to avoid aborting after some interactions with users. So, this
      assumes that user would choose not "deleted" but "changed".
      
      This patch also changes existing abort message, because sorting before
      collision detection changes order of checked files.
      c60a7f5a
    • Katsunori FUJIWARA's avatar
      icasefs: refactor "test-casecollision-merge.t" to reuse in succeeding fixes · 370d9ea0
      Katsunori FUJIWARA authored
      This patch refactors "test-casecollision-merge.t" to increase
      reusability in succeeding patches.
      
      It is confirmed that changed test also can detect issue3370.
      370d9ea0
    • Katsunori FUJIWARA's avatar
      icasefs: ignore removed files at building "dirstate._foldmap" up on icasefs · 0176d0db
      Katsunori FUJIWARA authored
      Before this patch, all files in dirstate are used to build "_foldmap"
      up on case insensitive filesystem regardless of their statuses.
      
      For example, when dirstate contains both removed file 'a' and added
      file 'A', "_foldmap" may be updated finally by removed file 'a'. This
      causes unexpected status information for added file 'A' at "hg status"
      invocation.
      
      This patch ignores removed files at building "_foldmap" up on case
      insensitive filessytem.
      
      This patch doesn't add any test, because this issue is difficult to
      reproduce intentionally: it depends on iteration order of "dirstate._map".
      0176d0db
  7. May 01, 2013
  8. Apr 30, 2013
  9. Apr 29, 2013
  10. 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
  11. 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
  12. 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
  13. 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
  14. Apr 27, 2013
  15. 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
  16. 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
  17. 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
  18. Apr 22, 2013
Loading