Skip to content
Snippets Groups Projects
  1. Jul 16, 2015
    • Yuya Nishihara's avatar
      parsers: fix buffer overflow by invalid parent revision read from revlog · 82d6a35c
      Yuya Nishihara authored
      If revlog file is corrupted, it can have parent pointing to invalid revision.
      So we should validate it before updating nothead[], phases[], seen[], etc.
      Otherwise it would cause segfault at best.
      
      We could use "rev" instead of "maxrev" as upper bound, but I think the explicit
      "maxrev" can clarify that we just want to avoid possible buffer overflow
      vulnerability.
      82d6a35c
    • Laurent Charignon's avatar
      histedit: mark temporary commits as obsolete when allowed to · ebb5bb9b
      Laurent Charignon authored
      Before this patch, we were stripping temporary commits at the end of a histedit
      whether it was successful or not. If we can create obs markers, we should
      create them instead of stripping because it is faster and safer.
      ebb5bb9b
    • Laurent Charignon's avatar
      histedit: minor refactoring of createmarkers check · 425839c8
      Laurent Charignon authored
      We use a variable to store whether or not we can create obsolescence markers.
      It makes the patch series more readable as we are going to reuse this
      values in other places in the function.
      425839c8
    • Laurent Charignon's avatar
      crecord: fix issue when backgrounding editor would leave artefact · 2cccaf93
      Laurent Charignon authored
      Before this patch:
      - if a user was entering a commit message after having ran the curses
      interface
      - and then uses ctrl-z, followed by fg to put the editor in the
      background/foreground
      - then the curses interface would leave artefact on the screen of
      the editor, making entering the commit message a difficult task
      
      This happened because ncurses registers a signal handler for SIGTSTP and
      does not restore the original signal handler after running.
      More info at:
      http://stackoverflow.com/questions/31440392/
      curses-wrapper-messing-up-terminal-after-background-foreground-sequence/
      31441709#31441709
      
      This patch restores the original value of the signal handler after
      running the curses interface and therefore fixes this issue.
      It don't know how to add a test for this issue, I tested the scenario
      above manually and it works correctly with the patch.
      2cccaf93
    • Katsunori FUJIWARA's avatar
      censor: make various path forms available like other Mercurial commands · 5e18f6e3
      Katsunori FUJIWARA authored
      Before this patch, censored file should be exactly "a path relative to
      repository root" regardless of current working directory, because "hg
      censor" passes "path" to "repo.file()" directly without any
      preparations.
      
      To make various path forms available like other Mercurial commands,
      this patch gets a target file path in the way of "hg parents FILE".
      
      Getting "wctx" is relocated to reuse "wctx" for efficiency.
      5e18f6e3
  2. Jul 14, 2015
    • Eugene Baranov's avatar
      convert: use 'default' for specifying branch name in branchmap (issue4753) · 584044e5
      Eugene Baranov authored
      A fix for issue2653 with 1d155582a8ea introduced a discrepancy how default
      branch should be denoted when converting with branchmap from different SCM.
      E.g. for Git and Mercurial you need to use 'default' whilst for Perforce and
      SVN you had to use 'None'. This changeset unifies 'default' for such purposes
      whilst falling back to 'None' when no 'default' mapping specified.
      584044e5
  3. Jul 05, 2015
  4. Jul 14, 2015
    • Katsunori FUJIWARA's avatar
      shelve: omit incorrect 'commit' suggestion at 'hg shelve -i' · 0eb093e4
      Katsunori FUJIWARA authored
      Before this patch, 'hg shelve -i' under non-interactive mode suggests
      'use commit instead', and it obviously incorrect, because what user
      wants to do isn't 'commit' but 'shelve'.
      
      To omit incorrect 'commit' suggestion at 'hg shelve -i', this patch
      specifies 'None' for 'cmdsuggest' argument of 'cmdutil.dorecord()'.
      0eb093e4
    • Katsunori FUJIWARA's avatar
      record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i' · 08f2177b
      Katsunori FUJIWARA authored
      Before this patch, 'hg qrefresh -i' under non-interactive mode
      suggests 'use qrefresh instead', and it obviously meaningless.
      
      To omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i', this
      patch specifies 'None' for 'cmdsuggest' argument of 'cmdutil.dorecord()'.
      08f2177b
    • Katsunori FUJIWARA's avatar
      record: omit meaningless 'qnew' suggestion at 'hg qnew -i' · cc9fb459
      Katsunori FUJIWARA authored
      Before this patch, 'hg qnew -i' under non-interactive mode suggests
      'use qnew instead', and it obviously meaningless.
      
      To omit meaningless 'qnew' suggestion at 'hg qnew -i', this patch adds
      internal function '_qrecord()' and specifies 'cmdsuggest' for each of
      'qrecord' and 'qnew' separately.
      cc9fb459
    • Katsunori FUJIWARA's avatar
      record: omit meaningless 'commit' suggestion at 'hg commit -i' · 4eb8d8a4
      Katsunori FUJIWARA authored
      Before this patch, 'hg commit -i' under non-interactive mode suggests
      'use commit instead', and it obviously meaningless.
      
      This patch makes 'record.record'()' examine 'ui.interactive()' and
      show suggestion by itself before calling 'commands.commit()'.
      
      This allows 'commands.commit()' to specify 'None' for 'cmdsuggest'
      argument of 'cmdutil.dorecord()' to omit meaningless 'commit'
      suggestion at 'hg commit -i'.
      4eb8d8a4
    • Katsunori FUJIWARA's avatar
      cmdutil: allow callers of cmdutil.dorecord to omit suggestion · 69145daa
      Katsunori FUJIWARA authored
      Interactive committing under non-interactive mode shows command
      suggestion, but sometimes it is meaningless.
      
        command      suggestion usability
        ------------ ---------- -----------
        record       commit
        commit -i    commit     meaningless
        qrecord      qnew
        qnew -i      qnew       meaningless
        qrefersh -i  qrefresh   meaningless
        shelve -i    commit     incorrect
        ------------ ---------- -----------
      
      This patch allows callers of 'cmdutil.dorecord()' to omit meaningless
      suggestion by passing None or so for 'cmdsuggest' argument of it.
      
      This is a preparation for subsequent patches, which fix each
      suggestion issues above.
      69145daa
  5. Jul 11, 2015
  6. Jun 25, 2015
    • Matt Mackall's avatar
      hgk: tweak doc format for path option · 08495766
      Matt Mackall authored
      This lets the config checker see it.
      08495766
    • Matt Mackall's avatar
      acl: mark deprecated config option · dd166d42
      Matt Mackall authored
      This option has been undocumented since day 0.
      dd166d42
    • Matt Mackall's avatar
      gpg: mention undocumented options · 917be057
      Matt Mackall authored
      917be057
    • Matt Mackall's avatar
      check-config: add config option checker · db5b6a1c
      Matt Mackall authored
      This script scans files for lines that look like either ui.config
      usage or config variable documentation. It then ensures:
      
      - ui.config calls for each option agree on types and defaults
      - every option appears to be mentioned in documentation
      
      It doesn't complain about devel/experimental options and allows
      marking options that are not intended to be public.
      
      Since we haven't been able to come up with a good scheme for
      documenting config options at point of use, this will help close the
      loop of making sure all options that should be documented are.
      db5b6a1c
  7. Jul 14, 2015
  8. Jul 12, 2015
  9. Jun 20, 2015
  10. Jun 21, 2015
  11. Jun 15, 2015
  12. Jul 12, 2015
    • Anton Shestakov's avatar
      hgweb: provide links to branches, tags and bookmarks by name (paper and coal) · cd842821
      Anton Shestakov authored
      It's sometimes handy to, say, have a url always point to branch head, not just
      at the current branch head by node hash. Previously, this was only possible by
      manually editing url and replacing node hash with branch/tag/bookmark name. It
      wasn't very convenient, or easy - in case the name contained special
      characters that needed to be urlencoded.
      
      Let's have /branches, /tags and /bookmarks pages in paper and coal style
      provide links both to symbolic revisions and to node hashes.
      
      This feature was wished for in issue3594.
      cd842821
    • Anton Shestakov's avatar
      templates: introduce revescape filter for escaping symbolic revisions · 3a334127
      Anton Shestakov authored
      There needs to be a way to escape symbolic revisions containing forward
      slashes, but urlescape filter doesn't escape slashes at all (in fact, it is
      used in places where forward slashes must be preserved).
      
      The filter considers @ to be safe just for bookmarks like @ and @default to
      look good in urls.
      3a334127
    • Anton Shestakov's avatar
      hgweb: allow symbolic revisions with forward slashes in urls · 1c2a8db3
      Anton Shestakov authored
      It's possible to have a branch/tag/bookmark with all kinds of special
      characters, such as {}/\!?. While not very conveniently, symbolic revisions
      with such characters work from command line if user correctly quotes the
      characters. These characters also work in hgweb, when they are properly
      encoded, with one exception: '/' (forward slash, urlencoded as '%2F'), which
      was getting decoded before hgweb could parse it as a part of PATH_INFO.
      Because of that, hgweb was seeing it as any other forward slash, that is, as
      just another url parts separator.
      
      For example, if user wanted to see the content of dir/file at bookmark
      'feature/eggs', url could be: '/file/feature%2Feggs/dir/file'. But hgweb tried
      to find a revision 'feature' and get contents of 'eggs/dir/file'.
      
      To fix this, let's assume forward slashes are doubly-urlencoded (%252F), so
      CGI/WSGI server decodes it into %2F. Then we can decode %2F in the revision
      part of the url into an actual '/' character.
      
      Making hgweb produce such urls will be done in the next 2 patches.
      1c2a8db3
  13. Jul 13, 2015
  14. Jul 08, 2015
    • Eugene Baranov's avatar
      convert: if getting a file from Perforce fails try to get it one more time · 220d9ae6
      Eugene Baranov authored
      When converting a particularly large Perforce changelist (especially with  some
      big files), it is very likely to run into an intermittent network issue (e.g.
      WSAECONNRESET or WSAETIMEDOUT) getting one of the files, which will result in
      the entire changelist converting being aborted. Which can be quite unfortunate
      since you might have waited hours getting all other files. To mitigate this
      let's attempt to get the file one more time, escalating original exception
      if that attempt fails.
      220d9ae6
  15. Jul 13, 2015
    • Katsunori FUJIWARA's avatar
      shelve: keep old backups if timestamp can't decide exact order of them · 4f8c20fe
      Katsunori FUJIWARA authored
      Before this patch, backups to be discarded are decided by steps below
      at 'hg unshelve' or so:
      
        1. list '(st_mtime, filename)' tuples of each backups up
        2. sort list of these tuples, and
        3. discard backups other than 'maxbackups' ones at the end of list
      
      This doesn't work well in the case below:
      
        - "sort by name" order differs from actual backup-ing order, and
        - some of backups have same timestamp
      
      For example, 'test-shelve.t' satisfies the former condition:
      
        - 'default-01' < 'default-1' in "sort by name" order
        - 'default-1'  < 'default-01' in actual backup-ing order
      
      Then, 'default-01' is discarded instead of 'default-1' unexpectedly,
      if they have same timestamp. This failure appears occasionally,
      because the most important condition "same timestamp" is timing
      critical.
      
      To avoid such unexpected discarding, this patch keeps old backups if
      timestamp can't decide exact order of them.
      
      Timestamp of the border backup (= the oldest one of recent
      'maxbackups' ones) as 'bordermtime' is used to examine whether
      timestamp can decide exact order of backups.
      4f8c20fe
  16. Jul 09, 2015
Loading