1. 20 Jun, 2015 5 commits
  2. 13 Jun, 2015 2 commits
    • W. Trevor King's avatar
      core/commands/unixfs/ls: Don't recurse into chunked files · 663f37cb
      W. Trevor King authored
      Folks operating at the Unix-filesystem level shouldn't care about that
      level of Merkle-DAG detail.  Before this commit we had:
      
        $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
        /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox:
        ... several lines of empty-string names ...
      
      And with this commit we have:
      
        $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
        /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
      
      I also reworked the argument-prefixing (object.Argument) in the output
      marshaller to avoid redundancies like:
      
        $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
        /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox:
        /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
      
      As a side-effect of this rework, we no longer have the trailing blank
      line that we used to have after the final directory listing.
      
      The new ErrImplementation is like Python's NotImplementedError, and is
      mostly a way to guard against external changes that would need
      associated updates in this code.  For example, once we see something
      that's neither a file nor a directory, we'll have to update the switch
      statement to handle those objects.
      
      License: MIT
      Signed-off-by: default avatarW. Trevor King <wking@tremily.us>
      663f37cb
    • W. Trevor King's avatar
      core/commands/unixfs: Add 'ipfs unixfs ls ...' · 434871ba
      W. Trevor King authored
      This is similar to 'ipfs ls ...', but it:
      
      * Lists file sizes that match the content size:
      
          $ ipfs --encoding=json unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4
          {
            "Objects": [
              {
                "Argument": "/ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4",
                "Links": [
                  {
                    "Name": "busybox",
                    "Hash": "QmPbjmmci73roXf9VijpyQGgRJZthiQfnEetaMRGoGYV5a",
                    "Size": 1947624,
                    "Type": 2
                  }
                ]
              }
            ]
          }
          $ ipfs cat /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox | wc -c
          1947624
      
        'ipfs ls ...', on the other hand, is using the Merkle-descendant
        size, which also includes fanout links and the typing information
        unixfs objects store in their Data:
      
          $ ipfs --encoding=json ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4
          {
            "Objects": [
              {
                "Hash": "/ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4",
                "Links": [
                  {
                    "Name": "busybox",
                    "Hash": "QmPbjmmci73roXf9VijpyQGgRJZthiQfnEetaMRGoGYV5a",
                    "Size": 1948128,
                    "Type": 2
                  }
                ]
              }
            ]
          }
      
      * Has a simpler text output corresponding to POSIX ls [1]:
      
          $ ipfs unixfs ls /ipfs/QmV2FrBtvue5ve7vxbAzKz3mTdWq8wfMNPwYd8d9KHksCF/gentoo/stage3/amd64/2015-04-02
          bin
          dev
          etc
          proc
          run
          sys
          $ ipfs ls /ipfs/QmV2FrBtvue5ve7vxbAzKz3mTdWq8wfMNPwYd8d9KHksCF/gentoo/stage3/amd64/2015-04-02
          QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4 1948183 bin/
          QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       dev/
          QmUz1Z5jnQEjwr78fiMk5babwjJBDmhN5sx5HvPiTGGGjM 1207    etc/
          QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       proc/
          QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       run/
          QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       sys/
      
        The minimal output allows us to start off with POSIX compliance and
        then add options (which may or may not be POSIX compatible) to
        adjust the output format as we get a better feel for what we need
        ([2] through [3]).
      
      [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html
      [2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41724727&page=5
      [3]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41725146&page=5
      
      License: MIT
      Signed-off-by: default avatarW. Trevor King <wking@tremily.us>
      434871ba
  3. 03 Jun, 2015 1 commit
  4. 26 May, 2015 1 commit
  5. 08 May, 2015 1 commit
    • Henry's avatar
      core: add context.Context param to core.Resolve() · f640ba00
      Henry authored
      commands/object: remove objectData() and objectLinks() helpers
      resolver: added context parameters
      sharness: $HASH carried the \r from the http protocol with
      sharness: write curl output to individual files
      http gw: break PUT handler until PR#1191
      f640ba00
  6. 20 Apr, 2015 2 commits
    • gatesvp's avatar
      Move IPNS resolutions into the core library · 31ff9545
      gatesvp authored
      Move IPNS resolutions into the core library via the pathresolver.go
      file. Fix the CLI commands to leverage this core component.
      31ff9545
    • Jeromy's avatar
      fix for #1008 and other pinning fixes · 0a6b880b
      Jeromy authored
      This commit adds a new set of sharness tests for pinning, and addresses
      bugs that were pointed out by said tests.
      
      test/sharness: added more pinning tests
      
      Pinning is currently broken. See issue #1051. This commit introduces
      a few more pinning tests. These are by no means exhaustive, but
      definitely surface the present problems going on. I believe these
      tests are correct, but not sure. Pushing them as failing so that
      pinning is fixed in this PR.
      
      make pinning and merkledag.Get take contexts
      
      improve 'add' commands usage of pinning
      
      FIXUP: fix 'pin lists look good'
      
      ipfs-pin-stat simple script to help check pinning
      
      This is a simple shell script to help check pinning.
      
      We ought to strive towards making adding commands this easy.
      The http api is great and powerful, but our setup right now
      gets in the way. Perhaps we can clean up that area.
      
      updated t0081-repo-pinning
      
      - fixed a couple bugs with the tests
      - made it a bit clearer (still a lot going on)
      - the remaining tests are correct and highlight a problem with
        pinning. Namely, that recursive pinning is buggy. At least:
        towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
        be pinned indirectly, but they're not. And thus get gc-ed out.
        There may be other problems too.
      
      cc @whyrusleeping
      
      fix grep params for context deadline check
      
      fix bugs in pin and pin tests
      
      check for block local before checking recursive pin
      0a6b880b
  7. 31 Mar, 2015 1 commit
  8. 20 Mar, 2015 1 commit
    • Henry's avatar
      ipfs ls: added --headers option · 07008042
      Henry authored
      - added tests for 'ipfs ls --headers'
      - comments from CR (opts)
      - sharness: fix ls test whitespace
      07008042
  9. 10 Mar, 2015 1 commit
  10. 01 Mar, 2015 1 commit
  11. 29 Jan, 2015 1 commit
  12. 24 Jan, 2015 1 commit
  13. 14 Jan, 2015 1 commit
  14. 06 Jan, 2015 2 commits
  15. 06 Dec, 2014 1 commit
  16. 18 Nov, 2014 2 commits
  17. 14 Nov, 2014 16 commits