Skip to content
Snippets Groups Projects
  1. Jul 08, 2015
    • Durham Goode's avatar
      convert: add support for specifying multiple revs · baea47cafe75
      Durham Goode authored
      Previously convert could only take one '--rev'. This change allows the user to
      specify multiple --rev entries. For instance, this could allow converting
      multiple branches (but not all branches) at once from git.
      
      In this first patch, we disable support for this for all sources.  Future
      patches will enable it for select sources (like git).
      baea47cafe75
  2. Jul 05, 2015
    • Anton Shestakov's avatar
      monoblue: use padding instead of position for text in footer · 5a15236f142a
      Anton Shestakov authored
      Some installations alter monoblue style and remove margins from body element
      (these margins have that dark gray background) to adapt hgweb instance to an
      already existing site design. However, the margins hid a quirk in page footer:
      a block of text needlessly popped out of the footer, and when margins were
      gone, the whole page got a vertical scroll bar because of that.
      
      Live example: https://hg.prosody.im/prosody-modules/
      
      To remove the potential scroll bar, this block of text now uses left padding,
      which doesn't make it overflow the footer, but makes it achieve the otherwise
      same result visually.
      5a15236f142a
    • Anton Shestakov's avatar
      monoblue: don't try to show repo on hgwebdir index page · 0c3c0f123a1a
      Anton Shestakov authored
      Index page shows a list of accessible repositories, it doesn't have a
      single-repo context.
      0c3c0f123a1a
  3. Sep 28, 2014
    • Pierre-Yves David's avatar
      bookmarks: change bookmark within a transaction · e78a80f8f51e
      Pierre-Yves David authored
      For some time, bookmark can and should be moved in the transaction. This
      changeset migrates the 'hg bookmarks' commands to use a transaction.
      
      Tests regarding rollback and transaction hooks are impacted for
      obvious reasons. Some have to be slightly updated to keep testing the
      same things. Some can just be dropped because they do not make sense
      anymore.
      e78a80f8f51e
  4. Jul 01, 2015
    • Pierre-Yves David's avatar
      bookmark: remove the "touch changelog" hack · ce45bfe8f953
      Pierre-Yves David authored
      Any changes to bookmarks used to touch the changelog to ensure hgweb was
      reloaded. This was fairly hacky and stops working when bookmarks are moved as
      part of the transaction. As hgweb is now explicitly tracking bookmark changes,
      we can remove this hack (and no tests break).
      ce45bfe8f953
  5. Jun 29, 2015
    • Durham Goode's avatar
      convert: add config option for disabling ancestor parent checks · d859123e0f47
      Durham Goode authored
      When converting merge commits, convert checks if any of the parents are
      ancestors of any of the other parents. To do this, it builds an ancestor list
      for every commit in the repository. On large repos this can take a long time
      (30min+). Let's add an option for disabling this check to preserve performance.
      
      The downside of this is that it may create unnecessary parent connections when
      enabled (which is unfortunate, but not incorrect).
      
      To verify, I ran the convert tests with the flag enabled, and verified the graph
      changes were all just to add new parents that were ancestors of existing
      parents.
      d859123e0f47
    • Durham Goode's avatar
      convert: add config to not convert tags · 86fe3c404c1e
      Durham Goode authored
      In some cases we do not want to convert tags from the source repo to be tags in
      the target repo (for instance, in a large repository, hgtags cause scaling
      issues so we want to avoid them). This adds a config option to disable
      converting tags.
      86fe3c404c1e
  6. Jul 02, 2015
  7. Jun 22, 2015
  8. Mar 14, 2015
    • Yuya Nishihara's avatar
      templatekw: apply manifest template only if ctx.manifestnode() exists · 8854ca3fa675
      Yuya Nishihara authored
      This will prevent crash by "hg log -r 'wdir()' -Tdefault". We could use the
      pseudo ff... hash introduced by 183965a00c76, but it isn't proven idea yet.
      For now, I want to make "hg log" just works in order to test 'wdir()' revset.
      
      Note that unlike its name, "{manifest}" is not a list of files in that
      revision, but a pair of (manifestrev, manifestnode).
      8854ca3fa675
  9. Jul 08, 2015
  10. Jul 04, 2015
  11. Jul 02, 2015
    • Katsunori FUJIWARA's avatar
      hghave: allow adding customized features at runtime · b94df10cc3b5
      Katsunori FUJIWARA authored
      Before this patch, there is no way to add customized features to
      `hghave` without changing `hghave` and `hghave.py` themselves.
      
      This decreases reusability of `run-tests.py` framework for third party
      tools, because they may want to examine custom features at runtime
      (e.g.  existence of some external tools).
      
      To allow adding customized features at runtime, this patch makes
      `hghave` import `hghaveaddon` module, only when `hghaveaddon.py` file
      can be found in directories below:
      
        - `TESTDIR` for invocation via `run-tests.py`
        - `.` for invocation via command line
      
      The path to the directory where `hghaveaddon.py` should be placed is
      added to `sys.path` only while importing `hghaveaddon`, because:
      
        - `.` may not be added to `PYTHONPATH`
      
        - adding additional path to `sys.path` may change behavior of
          subsequent `import` for other features
      
      `hghave` is terminated with exit code '2' at failure of `import
      hghaveaddon`, because exit code '2' terminates `run-tests.py`
      immediately.
      
      This is a one of preparations for issue4677.
      b94df10cc3b5
    • Katsunori FUJIWARA's avatar
      import-checker.py: exit with code 0 if no error is detected · cd1daab5d036
      Katsunori FUJIWARA authored
      Before this patch, `import-checker.py` exits with non-0 code, if no
      error is detected. This is unusual as Unix command.
      
      This change may be a one of preparations for issue4677, because this
      can avoid extra explanation about unusual exit code of
      `import-checker.py` for third party tool developers.
      cd1daab5d036
    • Katsunori FUJIWARA's avatar
      run-tests.py: add TESTDIR to PATH if it differs from RUNTESTDIR · c380d5273e91
      Katsunori FUJIWARA authored
      Before this patch, `RUNTESTDIR` is added to `PATH`, but `TESTDIR`
      isn't.
      
      This doesn't cause any problems, if `run-tests.py` runs in `tests`
      directory of Mercurial source tree. In this case, `RUNTESTDIR` should
      be equal to `TESTDIR`.
      
      On the other hand, if `run-tests.py` runs in `tests` of third party
      tools, commands in that directory should be executed with explicit
      `$TESTDIR/` prefix in `*.t` test scripts. This isn't suitable for the
      policy "drop explicit $TESTDIR from executables" of Mercurial itself
      (see 4d2b9b304ad0).
      
      BTW, 4d2b9b304ad0 describes that "$TESTDIR is added to the path" even
      though `TESTDIR` isn't added to `PATH` exactly speaking, because
      `TESTDIR` and `RUNTESTDIR` weren't yet distinguished from each other
      at that time.
      
      This is a one of preparations for issue4677.
      c380d5273e91
    • Katsunori FUJIWARA's avatar
      run-tests.py: add RUNTESTDIR to refer `tests` of Mercurial · 57dfadc4f46c
      Katsunori FUJIWARA authored
      Before this patch, there is no way to refer files under `tests` or so
      of Mercurial source tree, when `run-tests.py` runs in `tests` of third
      party tools. In this case, `TESTDIR` refers the latter `tests`.
      
      This prevents third party tools from using useful tools in Mercurial
      source tree (e.g. `contrib/check-code.py`).
      
      This patch adds `RUNTESTDIR` environment variable to refer `tests` of
      Mercurial source tree, in which `run-tests.py` now running is
      placed. For example, tests of third party tools can refer
      `contrib/check-code.py` in Mercurial source tree as
      `$RUNTESTDIR/../contrib/check-code.py`.
      
      BTW, for similarity with `TESTDIR` referring `test*s*` directory,
      newly added environment variable isn't named as `RUNTEST*S*DIR`. In
      addition to it, the corresponded local variable is also named as
      `runtestdir`.
      
      This is a one of preparations for issue4677.
      57dfadc4f46c
    • Katsunori FUJIWARA's avatar
      run-tests.py: execute hghave by the path relative to run-tests.py · 905c32321cfb
      Katsunori FUJIWARA authored
      Before this patch, `run-tests.py` executes `hghave` by the path
      relative to `TESTDIR` (= cwd of `run-tests.py` running).
      
      This prevents third party tools for Mercurial from running
      `run-tests.py`, which is placed in `tests` of Mercurial source tree,
      in `tests` of own source tree. In such cases, `TESTDIR` refers the
      latter `tests`, and `hghave` doesn't exist in it.
      
      This is a one of preparations for issue4677.
      905c32321cfb
  12. Jul 07, 2015
    • Matt Harbison's avatar
      templatekw: make {latesttag} a hybrid list · b8245386ab40
      Matt Harbison authored
      This maintains the previous behavior of expanding {latesttag} to a string
      containing all of the tags, joined by ':'.  But now it also allows list type
      operations.
      
      I'm unsure if the plural handling is correct (i.e. it seems like it is usually
      "{foos % '{foo}'}"), but I guess we are stuck with this because the singular
      form previously existed.
      b8245386ab40
    • Matt Harbison's avatar
      templatekw: allow the caller of showlist() to specify the join() separator · b44e483726d3
      Matt Harbison authored
      The keyword {latesttag} currently manually joins the list of tags using ':',
      which prevents a transparent switch over to a hybrid list.
      b44e483726d3
  13. Jul 01, 2015
  14. Jun 27, 2015
    • Matt Harbison's avatar
      templatekw: introduce the changessincelatesttag keyword · 4474a750413f
      Matt Harbison authored
      Archive is putting a value with the same name in the metadata file, to count all
      of the changes not covered by the latest tag, instead of just along the longest
      path.  It seems that this would be useful to have on the command line as well.
      It might be nice for the name to start with 'latesttag' so that it is grouped
      with the other tag keywords, but I can't think of a better name.
      
      The initial version of this counted a clean wdir() and '.' as the same value,
      and a dirty wdir() as the same value after it is committed.  Yuya objected on
      the grounds of consistency [1].  Since revsets can be used to conditionally
      select a dirty wdir() or '.' when clean, I can build the version string I need
      and will defer to him on this.
      
      [1] https://www.selenic.com/pipermail/mercurial-devel/2015-June/071588.html
      4474a750413f
  15. Jul 05, 2015
  16. Jul 02, 2015
    • Matt Harbison's avatar
      test-convert-git: use a relative gitmodule url · eb15c5be381c
      Matt Harbison authored
      The absolute URL was causing this error with 1.9.5 on Windows, which had a
      cascading effect:
      
        @@ -466,22 +466,24 @@
           >   url = $TESTTMP/git-repo5
           > EOF
           $ git commit -a -m "weird white space submodule"
        -  [master *] weird white space submodule (glob)
        -   Author: nottest <test@example.org>
        -   1 file changed, 3 insertions(+)
        +  fatal: bad config file line 6 in $TESTTMP/git-repo6/.gitmodules
        +  [128]
           $ cd ..
           $ hg convert git-repo6 hg-repo6
           initializing destination hg-repo6 repository
           scanning source...
      
      For reasons unknown, there is still this delta on Windows:
      
        @@ -490,7 +490,6 @@
           $ git commit -q -m "missing .gitmodules"
           $ cd ..
           $ hg convert git-repo6 hg-repo6 --traceback
        -  fatal: Path '.gitmodules' does not exist in '*' (glob)
           initializing destination hg-repo6 repository
           scanning source...
           sorting...
      eb15c5be381c
    • Matt Harbison's avatar
      test-convert-git: stablize for git 1.7.7.6 · 5b9b70635423
      Matt Harbison authored
      The output has apparently changed slightly since this version.  Since they are
      just commits without any obvious importance to the test, and I can't figure out
      how to glob them away, silence them.
      
      Sample diffs were like this:
      
        @@ -468,7 +468,7 @@
           $ git commit -a -m "weird white space submodule"
           [master *] weird white space submodule (glob)
            Author: nottest <test@example.org>
        -   1 file changed, 3 insertions(+)
        +   1 files changed, 3 insertions(+), 0 deletions(-)
           $ cd ..
           $ hg convert git-repo6 hg-repo6
           initializing destination hg-repo6 repository
      5b9b70635423
  17. Jul 01, 2015
    • Pierre-Yves David's avatar
      hgweb: also monitor change to bookmarks · bd2e171d023b
      Pierre-Yves David authored
      This makes changes to bookmarks visible to hgweb through the official
      way. There is no change to tests because there is currently another
      hack in place to ensure the same behavior.
      bd2e171d023b
    • Pierre-Yves David's avatar
      hgweb: also refresh the repo on changes to the obsstore · c51a18609a7f
      Pierre-Yves David authored
      Before this change, hgweb could miss update to the obsolescence markers store
      if that was the only change between two commands.
      c51a18609a7f
    • Pierre-Yves David's avatar
      hgweb: use an extensible list of files to check for refresh · 2e32f0897bcf
      Pierre-Yves David authored
      The refresh feature was explicitly testing if '00changelog.i' and 'phaseroots'
      changed. This is overlooking other important information like bookmarks and
      obsstore (bookmark have their own hack to work around it).
      
      We move to a more extensible system with a list of files of interest
      that will be used to build the repo state. The system should probably
      move into a more central place so that the command server and other
      systems are able to use it. Extension writers will also be able to add
      entries to ensure that changes to extension data are properly detected.
      
      Also the current key (mtime, size) is notably weak for bookmarks and phases
      whose files can easily change content without effect on their size.
      
      Still, this patch seems like a valuable minimal first step.
      2e32f0897bcf
  18. Jul 03, 2015
  19. Jul 06, 2015
  20. Jul 01, 2015
    • Colin Chan's avatar
      shelve: only keep the latest N shelve backups · 2ca116614cfc
      Colin Chan authored
      This will keep the backup directory from growing indefinitely. The number of
      backups to keep can be set using the shelve.maxbackups config option (defaults
      to 10 backups).
      2ca116614cfc
    • Colin Chan's avatar
      shelve: always backup shelves instead of deleting them · 8a6264a2ee60
      Colin Chan authored
      Instead of being deleted, shelve files are now moved into the .hg/shelve-backup
      directory. This is designed similarly to how strip saves backups into
      .ht/strip-backup. The goal is to prevent data loss especially when using
      unshelve. There are cases in which a user can complete an unshelve but lose
      some of the data that was shelved by, for example, resolving merge conflicts
      incorrectly. Storing backups will allow the user to recover the data that was
      shelved, at the expense of using more disk space over time.
      8a6264a2ee60
    • Pierre-Yves David's avatar
      wireproto: remove a debug print · 26579a91f4fb
      Pierre-Yves David authored
      This looks like someone forgot something here.
      26579a91f4fb
  21. Sep 28, 2014
  22. Jul 01, 2015
    • Pierre-Yves David's avatar
      amend: move createmarkers evaluation earlier · c87373179ff3
      Pierre-Yves David authored
      The value is used at multiple points in the function. Retrieving the
      value in the middle of the transaction scope gives the false
      impression that it has a single user. We move it at the start of the
      function to clarify this.
      c87373179ff3
  23. Jun 30, 2015
    • Augie Fackler's avatar
      wireproto: correctly escape batched args and responses (issue4739) · d3d32643c060
      Augie Fackler authored
      This issue appears to be as old as wireproto batching itself: I can
      reproduce the failure as far back as 08ef6b5f3715 trivially by
      rebasing the test changes in this patch, which was back in the 1.9
      era. I didn't test before that change, because prior to that the
      testfile has a different name and I'm lazy.
      
      Note that the test thought it was checking this case, but it actually
      wasn't: it put a literal ; in the arg and response for its greet
      command, but the mangle/unmangle step defined in the test meant that
      instead of "Fo, =;o" going over the wire, "Gp-!><p" went instead,
      which doesn't contain any special characters (those being [.=;]) and
      thus not exercising the escaping. The test has been updated to use
      pre-unmangled special characters, so the request is now "Fo+<:o",
      which mangles to "Gp,=;p". I have confirmed that the test fails
      without the adjustment to the escaping rules in wireproto.py.
      
      No existing clients of RPC batching were depending on the old behavior
      in any way. The only *actual* users of batchable RPCs in core were:
      
      1) largefiles, wherein it batches up many statlfile calls. It sends
      hexlified hashes over the wire and gets a 0, 1, or 2 back as a
      response. No risk of special characters.
      
      2) setdiscovery, which was using heads() and known(), both of which
      communicate via hexlified nodes. Again, no risk of special characters.
      
      Since the escaping functionality has been completely broken since it
      was introduced, we know that it has no users. As such, we can change
      the escaping mechanism without having to worry about backwards
      compatibility issues.
      
      For the curious, this was detected by chance: it happens that the
      lz4-compressed text of a test file for remotefilelog compressed to
      something containing a ;, which then caused the failure when I moved
      remotefilelog to using batching for file content fetching.
      d3d32643c060
Loading