Skip to content
Snippets Groups Projects
  1. Dec 21, 2017
    • Matt Harbison's avatar
      lfs: introduce a localstore method for downloading from remote stores · fa9dd53e
      Matt Harbison authored
      The current local.write() method requires the full data, which means
      concatenating file chunks in memory when downloading from a git server.  The
      dedicated method downloads in chunks, verifies the content on the fly, and
      creates the usercache hardlink if successful.  It can also be used for the file
      system based remotestore.
      
      An explicit division of labor between downloading from a remote store (which
      should be verified) and writing to the store because of a commit or similar
      (which doesn't need verification), seems clearer.  I can't figure out how to
      make a similar function for upload, because for a file remote store, it's a
      simple open/read/write operation.  For a gitremote store, it's open the file
      and a urlreq.request(), and process that.
      fa9dd53e
  2. Jan 02, 2018
  3. Oct 22, 2017
  4. Jan 04, 2018
  5. Oct 22, 2017
  6. Jan 04, 2018
  7. Dec 30, 2017
    • Yuya Nishihara's avatar
      revset: parse x^:: as (x^):: (issue5764) · beb667c9
      Yuya Nishihara authored
      We have to make '::' a valid primary expression to parse 'x^::' as '(x)^(::)'
      first, but that doesn't change the language because a prefix operator '::y'
      precedes a primary '::'.
      
      I can't think of an intuitive meaning of '::', so it's just rejected. Given
      'x::y' can be considered to default to {x = roots(), y = heads()}, '::' could
      be 'roots()::heads()', which seems not any useful.
      beb667c9
  8. Jan 06, 2018
  9. Jan 05, 2018
    • Martin von Zweigbergk's avatar
      tests: make #testcase available as env var in test · f04d16be
      Martin von Zweigbergk authored
      It can be useful for e.g. helper functions to behave differently
      depending on which test case is being executed. This patch helps with
      that by making the #testcase case available as a TESTCASE environment
      variable.
      
      Differential Revision: https://phab.mercurial-scm.org/D1816
      f04d16be
    • Pulkit Goyal's avatar
    • Pulkit Goyal's avatar
    • Anton Shestakov's avatar
      hgweb: stop adding strings to innerHTML of #graphnodes and #nodebgs (BC) · 8b958d21
      Anton Shestakov authored
      There's nothing that uses this functionality anymore, since all HTML is
      generated server-side now. Changeset entries are still accessible in JS via
      DOM (that's how we set left padding), so it's still possible to do something
      unusual by overriding Graph.prototype.vertex().
      8b958d21
    • Anton Shestakov's avatar
      spartan: make actual changeset entries have backgrounds on /graph · bb5a03df
      Anton Shestakov authored
      This patch removes a separate container for backgrounds only and puts
      backgrounds on changeset elements themselves. This makes it so that JS code
      doesn't need to create background elements separately anymore.
      
      There's a bit of manipulating positions of elements: every changeset entry has
      a "fg" element that gets a higher z-index than <canvas> element. This
      prioritizes text information, so that even if it somehow gets close to the
      graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it.
      This can happen if commit message has a long first line and browser window is
      narrow, for example.
      bb5a03df
    • Anton Shestakov's avatar
      gitweb: make actual changeset entries have backgrounds on /graph · 6c226473
      Anton Shestakov authored
      This patch removes a separate container for backgrounds only and puts
      backgrounds on changeset elements themselves. This makes it so that JS code
      doesn't need to create background elements separately anymore.
      
      There's a bit of manipulating positions of elements: every changeset entry has
      a "fg" element that gets a higher z-index than <canvas> element. This
      prioritizes text information, so that even if it somehow gets close to the
      graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it.
      This can happen if commit message has a long first line and browser window is
      narrow, for example.
      6c226473
    • Anton Shestakov's avatar
      monoblue: make actual changeset entries have backgrounds on /graph · acd8a245
      Anton Shestakov authored
      This patch removes a separate container for backgrounds only and puts
      backgrounds on changeset elements themselves. This makes it so that JS code
      doesn't need to create background elements separately anymore.
      
      There's a bit of manipulating positions of elements: every changeset entry has
      a "fg" element that gets a higher z-index than <canvas> element. This
      prioritizes text information, so that even if it somehow gets close to the
      graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it.
      This can happen if commit message has a long first line and browser window is
      narrow, for example.
      
      'parity' is added to each entry because there's no stripes2 class in monoblue,
      only in paper.
      acd8a245
    • Anton Shestakov's avatar
      paper: make actual changeset entries have backgrounds on /graph · 5afe0ca5
      Anton Shestakov authored
      This patch removes a separate container for backgrounds only and puts
      backgrounds on changeset elements themselves. This makes it so that JS code
      doesn't need to create background elements separately anymore.
      
      There's a bit of manipulating positions of elements: every changeset entry has
      a "fg" element that gets a higher z-index than <canvas> element. This
      prioritizes text information, so that even if it somehow gets close to the
      graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it.
      This can happen if commit message has a long first line and browser window is
      narrow, for example.
      5afe0ca5
  10. Jan 04, 2018
    • Elmar Bartel's avatar
      crecord: fallback to color = no when curses.use_default_colors() fails · fb2e59e9
      Elmar Bartel authored
      Even when python was setup/compiled with curses, curses.use_default_colors()
      may raise a curses exception when the TERM environment variable
      specifies a value where no propper color configuration is possible.
      This patch falls back to non-color mode to let the user continue
      instead of failing with an unhandled exception.
      fb2e59e9
    • Elmar Bartel's avatar
      crecord: honor "ui.color = no" config option · f43dc62c
      Elmar Bartel authored
      The current implementation of crecord ignores the ui.color setting.
      This patch checks the ui.color config option and does the curses setup
      without colors when the option is set to a falsy value. For other (or
      missing) setting of ui.color, curses setup is done as before and uses
      colors.
      f43dc62c
  11. Jan 03, 2018
    • Matt Harbison's avatar
      lfs: use the local store method for opening a blob · e8f80529
      Matt Harbison authored
      I noticed that when I cloned without updating and then turned around and pushed
      that clone to an lfs server, it was only trying to find the blob in the local
      store.
      
      Writes to the dummyremote (file based store) use local.read(), which looks at
      both the usercache and local store.
      e8f80529
    • Matt Harbison's avatar
      lfs: add a local store method for opening a blob · 83903433
      Matt Harbison authored
      The has() and read() methods already dynamically switch between the usercache
      and local store.  This should generally be preferred to directly accessing the
      vfs instances outside of the store.
      
      The file is now explicitly opened in binary mode for clarity.  (It was also
      being opened in binary mode before, but only because vfs.__call__() appends 'b'
      if needed when not opening with 'text=True'.)
      83903433
  12. Jan 05, 2018
  13. Jan 03, 2018
  14. Dec 25, 2017
    • Gregory Szorc's avatar
      revlog: don't use slicing to return parents · a0fab647
      Gregory Szorc authored
      This is the only place we use a slice on index entries, which
      are currently tuples. In preparation for moving away from tuples,
      let's stop using slices so we don't have to implement that support
      on the new type.
      
      We also tweak the logic slightly so the exception only catches the
      IndexError on the index lookup, not on the index entry lookup. The
      old code should never have been buggy. But it was semantically wrong.
      
      Differential Revision: https://phab.mercurial-scm.org/D1764
      a0fab647
  15. Jan 05, 2018
  16. Dec 26, 2017
  17. Jan 01, 2018
  18. Dec 30, 2017
    • Matt Harbison's avatar
      osutil: implement getfsmountpoint() on BSD systems · e01549a7
      Matt Harbison authored
      I don't have a BSD system handy to test this, but it looks simple enough from
      the man page.
      e01549a7
    • Matt Harbison's avatar
      debugfs: display the tested path and mount point of the filesystem, if known · 58803186
      Matt Harbison authored
      While implementing win32.getfstype(), I noticed that MSYS path mangling is
      getting in the way.  Given a path \\host\share\dir:
      
        - If strong quoted, hg receives it unchanged, and it works as expected
        - If double quoted, it converts to \host\share\dir
        - If unquoted, it converts to \hostsharedir
      
      The second and third cases are problematic because those are valid paths
      relative to the current drive letter, so os.path.realpath() will expand it as
      such.  The net effect is to silently turn a network path test into (typically) a
      "C:\" test.  Additionally, the command hangs after printing out 'symlink: no'
      for the third case (but is interruptable with Ctrl + C).  This path mangling
      only comes into play because of the command line arguments- it won't affect
      internally obtained paths.  Therefore, the simplest thing to do is to provide
      feedback on what the command is acting on.
      
      I also added the mount point, because Windows supports nesting [1] volumes (see
      the examples in "Junction Points and Mounted Folders"), and it was a useful
      diagnostic for figuring out why the wrong filesystem was printed out in the
      cases above.
      
      I opted not to call os.path.realpath() on the path argument, to make it clearer
      that the mangling isn't being done by Mercurial.
      
      [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364996(v=vs.85).aspx
      58803186
    • Matt Harbison's avatar
      util: add a function to show the mount point of the filesystem · c4caf530
      Matt Harbison authored
      For now, this is Windows only, since Linux doesn't have the value in its statfs
      structure, and I don't have a BSD system to test with.
      c4caf530
    • Matt Harbison's avatar
      win32: split a utility function to obtain the volume out of getfstype() · 5cc1becd
      Matt Harbison authored
      This is only done on Windows because it's simple enough to call statfs() on
      Unix.  The goal is to display this in `hg debugfs`.
      5cc1becd
  19. Dec 31, 2017
  20. Dec 30, 2017
    • Matt Harbison's avatar
      win32: implement util.getfstype() · 2062f7c2
      Matt Harbison authored
      This will allow NTFS to be added to the hardlink whitelist, and resume creating
      hardlinks in transactions (which was disabled globally in 07a92bbd02e5; see also
      e5ce49a30146).  I opted to report "cifs" for remote volumes because this shows
      in `hg debugfs`, which also reports that hardlinks are supported for these
      volumes.  So being able to distinguish it from "unknown" seems useful.
      
      The documentation [1] seems to indicate that SMB isn't supported by these
      functions, but experimenting shows that mapped drives are reported as "NTFS" on
      Windows 7.  I don't have a second Windows machine, but instead shared a temp
      directory on C:\.  In this setup, both of the following were detected as 'cifs'
      with the explicit GetDriveType() check:
      
        Z:\repo>hg ci -A
      
        C:\>hg -R \\hostname\temp\repo ci -A   # (without Z:\ being mapped)
      
      It looks like this is called 6 times to add and commit a single new file, so I'm
      a little surprised this isn't cached.
      
      [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364993(v=vs.85).aspx
      2062f7c2
  21. Dec 31, 2017
  22. Dec 22, 2017
Loading