Skip to content
Snippets Groups Projects
  1. Jul 31, 2014
  2. Jul 30, 2014
  3. Jul 26, 2014
  4. Jul 30, 2014
  5. Jul 29, 2014
    • Wagner Bruna's avatar
      i18n-pt_BR: synchronized with ad56fc55cbc3 · 5341c500
      Wagner Bruna authored
      5341c500
    • Katsunori FUJIWARA's avatar
      doc: unify help text for "--edit" option · 3838b910
      Katsunori FUJIWARA authored
      This patch changes help text for "--edit" option of commands below:
      
        - fetch
        - qnew
        - qrefresh
        - qfold
        - commit
        - tag
      
      This unification reduces translation cost, too.
      
      This patch chooses not "further edit commit message already specified"
      (of "hg commit") but "invoke editor on commit messages" as unified
      help text for "--edit" option, because the latter is much older than
      the former.
      3838b910
    • Katsunori FUJIWARA's avatar
      doc: unify help text for "--message" option · 59af0b21
      Katsunori FUJIWARA authored
      This patch changes help text for "--message" option of commands below
      for unification.
      
        - sign (of gpg)
        - tag
      
      This unification reduces translation cost, too.
      
      This patch doesn't change the description for "--message" of "hg
      rebase" below, because this should contain "collapse" word to explain
      its purpose (only for "--collapse") clearly.
      
          use text as collapse commit message
      59af0b21
  6. Jul 28, 2014
  7. Jul 26, 2014
  8. Jul 25, 2014
  9. Jul 21, 2014
  10. Jul 24, 2014
    • Yuya Nishihara's avatar
      test-status: add test for removed-and-untracked state (BC) · 64fe488b
      Yuya Nishihara authored
      In Mercurial 3.0, "hg status" can list the same file twice if it was removed
      but still exists in working directory, i.e. removed by "hg forget":
      
        $ hg status --rev 0 removed
        R removed
        ? removed
      
      But since 65cdc6bab91e, untracked state, "?", is no longer displayed in this
      example.
      
      I think the new behavior is correct since a file should have single state, but
      if it is a bug, this patch should be dropped.
      64fe488b
  11. Jul 02, 2014
    • Pierre-Yves David's avatar
      bundle2: only use callable return as reply handler · dab31290
      Pierre-Yves David authored
      When a bundle2 parts generator returns a non callable value, it should not be
      used as a reply handler. The changegroup part generator is already having this
      case of behavior when there is no changegroup to push. This changeset prevent a
      crash for user of the experimentable bundle2 feature.
      dab31290
  12. Jul 24, 2014
    • Nathan Goldbaum's avatar
      resolve: report no argument warning using a hint · 9209c02f
      Nathan Goldbaum authored
      With this change resolve and revert produce consistent output when run with no
      arguments:
      
      $ hg resolve
      abort: no files or directories specified
      (use --all to remerge all files)
      
      $ hg revert
      abort: no files or directories specified
      (use --all to revert all files)
      9209c02f
    • Gregory Szorc's avatar
      revset: optimize baseset.__sub__ (issue4313) · f486001f
      Gregory Szorc authored
      dd716807fd23 regressed performance of baseset.__sub__ by introducing
      a lazyset. This patch restores that lost performance by eagerly
      evaluating baseset.__sub__ if the other set is a baseset.
      
      revsetbenchmark.py results impacted by this change:
      
      revset #6: roots(0::tip)
      0) wall 2.923473 comb 2.920000 user 2.920000 sys 0.000000 (best of 4)
      1) wall 0.077614 comb 0.080000 user 0.080000 sys 0.000000 (best of 100)
      
      revset #23: roots((0:tip)::)
      0) wall 2.875178 comb 2.880000 user 2.880000 sys 0.000000 (best of 4)
      1) wall 0.154519 comb 0.150000 user 0.150000 sys 0.000000 (best of 61)
      
      On the author's machine, this slowdown manifested during evaluation of
      'roots(%ln::)' in phases.retractboundary after unbundling the Firefox
      repository. Using `time hg unbundle firefox.hg` as a benchmark:
      
      Before: 8:00
      After:  4:28
      Delta: -3:32
      
      For reference, the subset and cs baseset instances impacted by this
      change were of lengths 193634 and 193627, respectively.
      
      Explicit test coverage of roots(%ln::), while similar to the existing
      roots(0::tip) benchmark, has been added.
      f486001f
  13. Jul 16, 2014
  14. Jul 23, 2014
  15. Jul 20, 2014
  16. Jul 22, 2014
    • Katsunori FUJIWARA's avatar
      largefiles: use "normallookup" on "lfdirstate" while reverting · 0cb34b39
      Katsunori FUJIWARA authored
      Before this patch, largefiles gotten from revisions other than the
      parent of the working directory at "hg revert" become "clean"
      unexpectedly in steps below:
      
          1. "repo.status()" is invoked (for status check before reverting)
            1-1 "dirstate" entry for standinfile SF is "normal"-ed
           (1-2 "lfdirstate" entry of largefile LF (for SF) is "normal"-ed)
      
          2. "cmdutil.revert()" is invoked
            2-1 standinfile SF is updated in the working directory
            2-2 "dirstate" entry for SF is NOT updated
      
          3. "lfcommands.updatelfiles()" is invoked (by "overrides.overriderevert()")
            3-1 largefile LF (for SF) is updated in the working directory
            3-2 "dirstate" returns "n" and valid timestamp for SF (by 1-1 and 2-2)
            3-3 "lfdirstate" entry for LF is "normal"-ed
            3-4 "lfdirstate" is written into ".hg/largefiles/dirstate", and
                timestamp of LF is stored into "lfdirstate" file (by 3-3)
                (ASSUMPTION: timestamp of LF differs from one of "lfdirstate" file)
      
      Then, "hs status" treats LF as "clean", even though LF is updated by
      "other" revision (by 3-1), because "lfilesrepo.status()" always treats
      "normal"-ed files (by 3-3 and 3-4) as "clean".
      
      When largefiles are reverted, they should be "normallookup"-ed
      forcibly.
      
      This patch uses "normallookup" on "lfdirstate" while reverting, by
      passing "True" to newly added argument "normallookup".
      
      Forcible "normallookup"-ing is not so expensive, because list of
      target largefiles is explicitly specified in this case.
      
      This patch uses "[debug] dirstate.delaywrite" feature in the test, to
      ensure that timestamp of the largefile gotten from "other" revision is
      stored into ".hg/largefiles/dirstate" (for ASSUMPTION at 3-4)
      0cb34b39
    • Katsunori FUJIWARA's avatar
      largefiles: invoke "normallookup" on "lfdirstate" for merged files · 8ecbe55f
      Katsunori FUJIWARA authored
      Before this patch, largefiles gotten from "other" revision (with
      conflict) at "hg merge" become "clean" unexpectedly in steps below:
      
          1. "repo.status()" is invoked (for status check before merging)
            1-1 "dirstate" entry for standinfile SF is "normal"-ed
            1-2 "lfdirstate" entry of largefile LF (for SF) is "normal"-ed
      
          2. "merge.update()" is invoked
            2-1 SF is updated in the working directory
                (ASSUMPTION: user choice "other" at conflict)
            2-2 "dirstate" entry for SF is "merge"-ed
      
          3. "lfcommands.updatelfiles()" is invoked (by "overrides.hgmerge()")
            3-1 largefile LF (for SF) is updated in the working directory
            3-2 "dirstate" returns "m" for SF (by 2-2)
            3-3 "lfdirstate" entry for LF is left as it is
            3-4 "lfdirstate" is written into ".hg/largefiles/dirstate", and
                timestamp of LF is stored into "lfdirstate" file (by 1-2)
                (ASSUMPTION: timestamp of LF differs from one of "lfdirstate" file)
      
      Then, "hs status" treats LF as "clean", even though LF is updated by
      "other" revision (by 3-1), because "lfilesrepo.status()" always treats
      "normal"-ed files (by 1-2 and 3-4) as "clean".
      
      When state of standinfile in "dirstate" is "m", largefile should be
      "normallookup"-ed.
      
      This patch invokes "normallookup" on "lfdirstate" for merged files.
      
      This patch uses "[debug] dirstate.delaywrite" feature in the test, to
      ensure that timestamp of the largefile gotten from "other" revision is
      stored into ".hg/largefiles/dirstate". (for ASSUMPTION at 3-4)
      8ecbe55f
    • Katsunori FUJIWARA's avatar
      largefiles: use "normallookup", if "mtime" of standin is unset · 21a2f31f
      Katsunori FUJIWARA authored
      Before this patch, largefiles gotten from "other" revision (without
      conflict) at "hg merge" become "clean" unexpectedly in steps below:
      
          1. "merge.update()" is invoked
            1-1 standinfile SF is updated in the working directory
            1-2 "dirstate" entry for SF is "normallookup"-ed
      
          2. "lfcommands.updatelfiles()" is invoked (by "overrides.hgmerge()")
            2-1 largefile LF (for SF) is updated in the working directory
            2-2 "dirstate" returns "n" for SF (by 1-2)
            2-3 "lfdirstate" entry for LF is "normal"-ed
            2-4 "lfdirstate" is written into ".hg/largefiles/dirstate", and
                timestamp of LF is stored into "lfdirstate" file
                (ASSUMPTION: timestamp of LF differs from one of "lfdirstate" file)
      
      Then, "hs status" treats LF as "clean", even though LF is updated by
      "other" revision (by 2-1), because "lfilesrepo.status()" always treats
      "normal"-ed files (by 2-3 and 2-4) as "clean".
      
      When timestamp is not set (= negative value) for standinfile in
      "dirstate", largefile should be "normallookup"-ed regardless of
      rebasing or not, because "n" state in "dirstate" doesn't ensure
      "clean"-ness of a standinfile at that time.
      
      This patch uses "normallookup" instead of "normal", if "mtime" of
      standin is unset
      
      This is a temporary way to fix with less changes. For fundamental
      resolution of this kind of problems in the future, "lfdirstate" should
      be updated with "dirstate" simultaneously while "merge.update"
      execution: maybe by hooking "recordupdates"
      
      It is also why this patch (temporarily) uses internal field "_map" of
      "dirstate" directly.
      
      This patch uses "[debug] dirstate.delaywrite" feature in the test, to
      ensure that timestamp of the largefile gotten from "other" revision is
      stored into ".hg/largefiles/dirstate". (for ASSUMPTION at 2-4)
      
      This patch newly adds "test-largefiles-update.t", to avoid increasing
      cost to run other tests for largefiles by subsequent patches
      (especially, "[debug] dirstate.delaywrite" causes so).
      21a2f31f
    • Katsunori FUJIWARA's avatar
      dirstate: delay writing out to ensure timestamp of each entries explicitly · 89b809fa
      Katsunori FUJIWARA authored
      Even though "dirstate.write()" is invoked explicitly after "normal"
      invocations, timestamp field of entries may be still "unset" in the
      "dirstate" file itself , because "pack_dirstate" drops it when it is
      equal to the timestamp of "dirstate" file itself.
      
      This can avoid overlooking modification of files, which are updated at
      same time in the second. But on the other hand, this may hide timing
      critical problems.
      
      For example, incorrect "normal"-ing (or lack of "normallookup"-ing on
      the already "normal"-ed entry) is visible only when:
      
        - the target file is modified in the working directory at T1, and
        - "dirstate" file is written out at T2 (!= T1)
      
      Otherwise, T1 is dropped by "pack_dirstate" in "dirstate.write()"
      invocation, and "unset" is stored into "dirstate" file.
      
      It often fails to reproduce problems from incorrect "normal"-ing by
      Mercurial testset, because automated actions in the small repository
      almost always causes that T1 and T2 are same.
      
      This patch adds the debug feature to delay writing out to ensure
      timestamp of each entries explicitly.
      
      This feature is used to make timing critical "dirstate" problems
      reproducable in subsequent patches.
      89b809fa
  17. Jul 21, 2014
  18. Jul 20, 2014
  19. Jul 19, 2014
  20. Jul 18, 2014
  21. Jul 15, 2014
    • Katsunori FUJIWARA's avatar
      cmdutil: make commit message shown in text editor customizable by template · 5375ba75
      Katsunori FUJIWARA authored
      This patch makes commit message shown in text editor customizable by
      template. For example, this can advertise:
      
        - sample commit messages for routine works,
        - points to call attention before commit,
        - message of the day, and so on
      
      To show commit message correctly even in problematic encoding, this
      patch chooses the latter below:
      
        - replace "buildcommittext" with "buildcommittemplate" completely
      
        - invoke "buildcommittemplate" only if '[committemplate] changeset'
          is configured explicitly
      
      For example, if multibyte character ending with backslash (0x5c) is
      followed by ASCII character 'n' in the customized template, sequence
      of backslash and 'n' is treated as line-feed unexpectedly (and
      multibyte character is broken, too).
      
      This corruption occurs in 'decode("string-escape")' while parsing
      template string.
      5375ba75
  22. Jul 19, 2014
  23. Jun 25, 2014
    • Angel Ezquerra's avatar
      filemerge: add internal:tagmerge merge tool · 50e20154
      Angel Ezquerra authored
      Add a new internal:tagmerge merge tool which implements an automatic merge
      algorithm for mercurial's tag files
      
      The tagmerge algorithm is able to resolve most merge conflicts that
      currently would trigger a .hgtags merge conflict. The only case that
      it does not (and cannot) handle is that in which two tags point to
      different revisions on each merge parent _and_ their corresponding tag
      histories have the same rank (i.e. the same length). In all other
      cases the merge algorithm will choose the revision belonging to the
      parent with the highest ranked tag history. The merged tag history is
      the combination of both tag histories (special care is taken to try to
      combine common tag histories where possible).
      
      The algorithm also handles cases in which tags have been manually
      removed from the .hgtags file and other similar corner cases.
      
      In addition to actually merging the tags from two parents, taking into
      account the base, the algorithm also tries to minimize the difference
      between the merged tag file and the first parent's tag file (i.e. it
      tries to make the merged tag order as as similar as possible to the
      first parent's tag file order).
      
      The algorithm works as follows:
      1. read the tags from p1, p2 and the base
          - when reading the p1 tags, also get the line numbers associated to each
            tag node (these will be used to sort the merged tags in a way that
            minimizes the diff to p1). Ignore the file numbers when reading p2 and
            the base
      2. recover the "lost tags" (i.e. those that are found in the base but not on p1
         or p2) and add them back to p1 and/or p2
          - at this point the only tags that are on p1 but not on p2 are those new
            tags that were introduced in p1. Same thing for the tags that are on p2
            but not on p2
      3. take all tags that are only on p1 or only on p2 (but not on the base)
          - Note that these are the tags that were introduced between base and p1 and
            between base and p2, possibly on separate clones
      4. for each tag found both on p1 and p2 perform the following merge algorithm:
          - the tags conflict if their tag "histories" have the same "rank" (i.e.
            length) _AND_ the last (current) tag is _NOT_ the same
          - for non conflicting tags:
              - choose which are the high and the low ranking nodes
                  - the high ranking list of nodes is the one that is longer.
                    In case of draw favor p1
                  - the merged node list is made of 3 parts:
                      - first the nodes that are common to the beginning of both the
                        low and the high ranking nodes
                      - second the non common low ranking nodes
                      - finally the non common high ranking nodes (with the last one
                        being the merged tag node)
                  - note that this is equivalent to putting the whole low ranking node
                    list first, followed by the non common high ranking nodes
          - note that during the merge we keep the "node line numbers", which will
            be used when writing the merged tags to the tag file
      5. write the merged tags taking into account to their positions in the first
         parent (i.e. try to keep the relative ordering of the nodes that come
         from p1). This minimizes the diff between the merged and the p1 tag files
         This is done by using the following algorithm
          - group the nodes for a given tag that must be written next to each other
              - A: nodes that come from consecutive lines on p1
              - B: nodes that come from p2 (i.e. whose associated line number is None)
                   and are next to one of the a nodes in A
              - each group is associated with a line number coming from p1
          - generate a "tag block" for each of the groups
              - a tag block is a set of consecutive "node tag" lines belonging to the
                same tag and which will be written next to each other on the merged
                tags file
          - sort the "tag blocks" according to their associated number line
              - put blocks whose nodes come all from p2 first
          - write the tag blocks in the sorted order
      
      Notes:
      - A few tests have been added to test-tag.t. These tests are very specific to
      the new internal:tagmerge tool, so perhaps they should be moved to their own
      test file.
      - The merge algorithm was discussed in a thread on the mercurial mailing list.
      In http://markmail.org/message/anqaxldup4tmgyrx a slightly different algorithm
      was suggested. In it the p1 and p2 tags would have been interleaved instead of
      put one before the other. It would be possible to implement that but my tests
      suggest that the merge result would be more confusing and harder to understand.
      50e20154
Loading