Skip to content
Snippets Groups Projects
  1. Jul 14, 2014
  2. Jul 12, 2014
  3. Jul 05, 2014
    • Katsunori FUJIWARA's avatar
      filemerge: use 'util.ellipsis' to trim custom conflict markers correctly · 78e56e70
      Katsunori FUJIWARA authored
      Before this patch, filemerge slices byte sequence directly to trim
      conflict markers, but this may cause:
      
        - splitting at intermediate multi-byte sequence
      
        - incorrect calculation of column width (length of byte sequence is
          different from columns in display in many cases)
      
      This patch uses 'util.ellipsis' to trim custom conflict markers
      correctly, even if multi-byte characters are used in them.
      78e56e70
    • Katsunori FUJIWARA's avatar
      filemerge: use only the first line of the generated conflict marker for safety · 755bf1bb
      Katsunori FUJIWARA authored
      Before this patch, with careless configuration (missing '|firstline'
      filtering for '{desc}' keyword, for example), '[ui]
      mergemarkertemplate' can make conflict markers multiple lines.
      
      For ordinary users, advantage of allowing '[ui] mergemarkertemplate'
      to generate multiple lines for customizing seems to be less than
      advantage of disallowing it for safety.
      
      This patch uses only the first line of the conflict marker generated
      from '[ui] mergemarkertemplate' configuration for safety.
      755bf1bb
    • Katsunori FUJIWARA's avatar
      progress: use 'encoding.colwidth' to get column width of items correctly · f9c91c63
      Katsunori FUJIWARA authored
      Before this patch, 'progress' extension applies 'len' on byte sequence
      to get column width of it, but it causes incorrect result, when length
      of byte sequence and columns in display are different from each other
      in multi-byte characters.
      
      This patch uses 'encoding.colwidth' to get column width of items in
      output line correctly, even if it contains multi-byte characters.
      f9c91c63
    • Katsunori FUJIWARA's avatar
      progress: use 'encoding.trim' to trim items in output line correctly · ba7f75e7
      Katsunori FUJIWARA authored
      Before this patch, 'progress' extension trims items in output line by
      directly slicing byte sequence, but it may split at intermediate
      multi-byte sequence.
      
      This patch uses 'encoding.trim' to trim items in output line
      correctly, even if it contains multi-byte characters.
      ba7f75e7
    • Katsunori FUJIWARA's avatar
    • Katsunori FUJIWARA's avatar
      progress: use 'encoding.colwidth' to get column width of output line correctly · e382cf9e
      Katsunori FUJIWARA authored
      Before this patch, 'progress' extension applies 'len' on byte sequence
      to get column width of it, but it causes incorrect result, when length
      of byte sequence and columns in display are different from each other
      in multi-byte characters.
      
      This patch uses 'encoding.colwidth' to get column width of output line
      correctly, even if it contains multi-byte characters.
      e382cf9e
    • Katsunori FUJIWARA's avatar
      progress: use 'encoding.trim' to trim output line correctly · be4270d2
      Katsunori FUJIWARA authored
      Before this patch, 'progress' extension trims output line by directly
      slicing byte sequence, but it may split at intermediate multi-byte
      sequence.
      
      This patch uses 'encoding.trim' to trim output line correctly, even if
      it contains multi-byte characters.
      
      "rm -f loop.pyc" before changing "loop.py" in "test-progress.t"
      ensures that re-compilation of "loop.py", even if "loop.py" and
      "loop.pyc" have same timestamp in seconds.
      be4270d2
    • Katsunori FUJIWARA's avatar
      histedit: use 'util.ellipsis' to trim description of each changesets · 50fd3a36
      Katsunori FUJIWARA authored
      Before this patch, trimming description of each changesets in histedit
      may split at intermediate multi-byte sequence.
      
      This patch uses 'util.ellipsis' to trim description of each changesets
      instead of directly slicing byte sequence.
      
      Even though 'util.ellipsis' adds '...' as ellipsis when specified
      string is trimmed (= this changes result of trimming), this patch uses
      it, because:
      
        - it can be used without any additional 'import', and
        - ellipsis seems to be better than just trimming, for usability
      50fd3a36
    • Katsunori FUJIWARA's avatar
      util: replace 'ellipsis' implementation by 'encoding.trim' · 86c2d792
      Katsunori FUJIWARA authored
      Before this patch, 'util.ellipsis' tried to avoid splitting at
      intermediate multi-byte sequence, but its implementation was incorrect.
      
      Internal function '_ellipsis' trims specified unicode sequence not at
      most maxlength 'columns in display', but at most maxlength number of
      'unicode characters'.
      
          def _ellipsis(text, maxlength):
              if len(text) <= maxlength:
                  return text, False
              else:
                  return "%s..." % (text[:maxlength - 3]), True
      
      In many encodings, number of unicode characters can be different from
      columns in display.
      
      This patch replaces 'ellipsis' implementation by 'encoding.trim',
      which can trim string at most maxlength columns in display correctly,
      even though specified string contains multi-byte characters.
      
      '_ellipsis' is removed in this patch, because it is referred only from
      'ellipsis'.
      86c2d792
    • Katsunori FUJIWARA's avatar
      encoding: add 'trim' to trim multi-byte characters at most specified columns · d24969ee
      Katsunori FUJIWARA authored
      Newly added 'trim' is used to trim multi-byte characters at most
      specified columns correctly: directly slicing byte sequence should be
      replaced with 'encoding.trim', because the former may split at
      intermediate multi-byte sequence.
      
      Slicing unicode sequence ('uslice') and concatenation with ellipsis
      ('concat') are defined as function, to make enhancement in subsequent
      patch easier.
      d24969ee
  4. Jul 11, 2014
    • Matt Mackall's avatar
      strip: drop -b/--backup option (BC) · ba3bc647
      Matt Mackall authored
      This option had very limited utility and counterintuitive behavior and
      collided unfortunately with the much later -B option.
      
      Normally we would no-op such a feature so as to avoid annoying existing
      scripts. However, we have to weigh that against the silent misbehavior
      that results when users mistakenly intended to use -B: because -b
      takes no arg, the bookmark gets interpreted as a normal revision, and
      gets stripped without removing the associated bookmark, while also not
      backing up the revision in question. A no-op behavior or warning would only
      remove the latter half of the misadventure.
      
      The only users I can find of this feature were using it in error and
      have since stopped. The few (if any) remaining users of this feature
      would be better served by --no-backup.
      ba3bc647
  5. Nov 08, 2013
  6. Jun 20, 2014
    • Katsunori FUJIWARA's avatar
      shelve: accept '--edit' like other commands creating new changeset · 37a5decc
      Katsunori FUJIWARA authored
      After this patch, users can invoke editor for the commit message by
      '--edit' option regardless of '--message'.
      37a5decc
    • Katsunori FUJIWARA's avatar
      shelve: refactor option combination check to easily add new ones · aad28ff8
      Katsunori FUJIWARA authored
      Before this patch, the name of a newly added option had to be added
      into each string that was passed to the "checkopt()" internal
      function: these are white-space-separated list of un-acceptable option
      names (= "black list" for the specified "opt").
      
      This new option had to be added into multiple strings because each
      option could belong to only one action of "create", "cleanup",
      "delete" or "list".
      
      In addition to this redundancy, each string passed to "checkopt()" was
      already too long to include a new one.
      
      This patch refactors option combination check to make it easier to add
      a new option in a subsequent patch.
      
      New "checkopt()" only takes one action ("cleanup", "delete" or
      "list"), and checks whether all explicitly activated options are
      allowed for it or not (if specified action is activated in "opts").
      
      The "date" entry is listed in "allowables", but commented out,
      because:
      
        - "date" shouldn't be checked for test
      
          checking "date" causes unexpected failure of "test-shelve.t",
          because "run-test.py" puts "[default] shelve = --date '0 0'" into
          hgrc.
      
        - explicitly listing it can advertise that ignoring it is intentional
      
      This patch doesn't choose "white list" for the specified "opt", to
      avoid treating global options.
      aad28ff8
  7. Jul 09, 2014
  8. Jun 10, 2014
  9. Jul 08, 2014
  10. Jun 13, 2014
    • Ryan McElroy's avatar
      templater: introduce word function · 8f23f809
      Ryan McElroy authored
      This function allows returning only the nth "word" from a string. By default
      a string is split as by Python's split() function default, but an optional
      third parameter can also override what string the string is split by.
      8f23f809
  11. Jul 04, 2014
  12. Jul 02, 2014
    • Sean Farley's avatar
      memctx: explicitly set substate to None · 7cfd94ec
      Sean Farley authored
      In d2743be1bb06, memctx was changed to inherit from committablectx, this in
      turn added the 'substate' property to memctx. It turns out that the
      newcommitphase method tested for this property:
      
        def newcommitphase(ui, ctx):
            commitphase = phases.newcommitphase(ui)
            substate = getattr(ctx, "substate", None)
            if not substate:
                return commitphase
      
      Currently, memctx isn't ready to handle substates, nor removed files, so we
      explicitly must set substate=None to get the old behavior back. In the future,
      we can decide how memctx should play with substate. For now, this fixes
      third-party extensions and some internal code dealing with subrepos.
      7cfd94ec
  13. Jul 08, 2014
    • Matt Mackall's avatar
      bookmarks: avoid deleting primary bookmarks on rebase · 92666a86
      Matt Mackall authored
      Prior to this, doing "hg rebase -s @foo -d @" would delete @, which is
      obviously wrong: a primary bookmark should never be automatically deleted.
      
      This change blocks the deletion, but doesn't yet properly clean up the
      divergence: @ should replace @foo.
      92666a86
  14. Jul 03, 2014
  15. Jul 06, 2014
  16. Jul 05, 2014
  17. Jul 03, 2014
  18. Jun 13, 2014
  19. May 29, 2014
  20. Apr 29, 2014
  21. Aug 14, 2013
  22. Jul 02, 2014
  23. Jun 30, 2014
Loading