github odeke-em/drive v0.3.9
Release v0.3.9(UltraLightPushes)

latest releases: v0.4.0, v0.3.9.1
7 years ago

This is the first release for 2017, following the last release ~4 months ago.

Lots of bug fixes and updates to this release:

  • fixed a progress bar overflow: This bug was reported in duplicate issues:

  • fixed up spurious pagination that resulted from asynchronous pagination before children were produced.
    This issue was reported by @bjohas in #724.
    It was fixed by PR #768.

  • unshare no matches found bug when no --type was specified.
    This issue was reported by @bjohas in issue #747.
    The problem was that if a user made a request such as:

    $ drive unshare -emails somebody@gmail.com -id some_id

    without having specified the --type, no default accountType was set, hence the
    user would get back an non-intuitive/cryptic error

    no matches found!

    The change in PR #771 fixed it; it adds User
    as the defaultType.

  • fixed a regression in which emails were no longer being set. This issue was noticed in #762. It was fixed by PR #763.

  • fixed a bug in which local and remote dirTypes differed. There was a long standing TODO in code
    to fix this issue and it was high time that the chickens had come home to roost. This issue was fixed
    by PR #770.
    The result of the fix is that if the types differ, we now get an informative error

$ drive new --mime-key docs share_test
$ mkdir -p share_test
$ drive pull share_test; echo $?
Resolving...
/share_test: local is a directory while remote is a file
8
  • fixed up a README inconsistency in the documentation of the various options. This issue was reported by
    @jean-christophe-manciot in issue #772. The issue involved
    contributions from @sselph and @shaggytwodope. The cause of confusion is that Go's flag package
    accepts both -flag and --flag indiscriminately. For folks used to *NIX CLI options get confused
    because they are accustomed to -s and --short instead where:
    +-s is the short option
    +--short is the long option
    The issue was fixed by @shaggytwodope with PR #779.

  • added the ability to structure .driverc files. This feature was requested by @jean-christophe-manciot in
    issue #778. The need for this feature is that using a single global
    configuration for every option is very limiting, because one will want --depth=1 for list and --depth=-1
    for push, of which the old style of a single configuration style couldn't accomodate.
    The solution was implemented by PR #813 and
    package https://github.com/odeke-em/namespace.
    The new style .driverc file allows for structure e.g

    id=true
    
    [global]
    depth=10
    
    [pull/list]
    depth=2
    
    [push]
    verbose=true
    
    [list]
    long=true

where a section is a command's verb that can be run on the commandline e.g push, pull, list, delete, trash etc, as well as special global which indicates the fallback/general-purpose section.
The rules of resolution are:
a) If an option is specified in a section that isn't [global], it has precedence over the
[global] or default options e.g

[push]
no-clobber=true
[global]
no-clobber=false

no-clobber=true wins
b) for options in the same section, the later the option the higher the overriding precedence e.g

[list]
long=false
depth=-1
long=true

In this case long=true was declared later so long=true wins

c) multiple sections can be specified in a section, but separated by "/":

[push/pull/list]
depth=-1
no-clobber=true

will make depth=-1, no-clobber=true for push, pull and list.

  • fixed an off by one traversal depth bug for md5sum and stat. This bug was reported by
    @jean-christophe-manciot in #783. The problem was that at
    the entry of the recursive function, we'd asap check if depth=0 and exist. However, if we are traversing
    a directory/folder, in order to stop recursion on every step we'll decrement the depth by 1. By the time we
    hit a non-directory after starting from a directory, we'd not stat/md5sum it. The fix was to first perform
    the desired operations and then only check that condition at the end. It was fixed by PR
    #832.

  • Updated the README documentation to describe how to use --notify for file sharing. This issue was reported by @bjohas in issue #791. It was also fixed by @bjohas
    with PR #791.

  • fixed an illogical return status code on stat failure. This bug was reported by @aueuaio in issue #801. The problem was that the stat error was getting shadowed and also it was being logged to stdout instead of being recomposed and propagated on exit. It was fixed by PR #804.

  • added a new mode to fix clashes with option --fix-mode. This feature was designed and implemented by @iblis17 in PR #810. The feature is a new policy that allows you:

    • trash clashing files.
      The default behavior is to rename them.
      We can now do
    $ drive clashes --fix --fix-mode trash

    In that PR, also @jpambrun gave an alternate view and caution on user expectations.
    This is pretty cool, it was @iblis17's first Go code and they knocked it out of the park!!
    Congrats @iblis17, we are lucky to have you in the drive community and also in the Go community!

  • fixed spurious rename error for non-existent-to-begin-with-file. This error was reported in issue #826. The problem and use case was that I was manipulating
    files that only exist on the cloud and not on my local disk because I have no local disk space. However,
    on performing a rename of a file that only exists remotely, I'd get a spurious error such as

$  drive rename WINTER2017/h1.s binary.s
rename /Users/emmanuelodeke/odeke@ualberta.ca/ENGINEERING/WINTER2017/h1.s /Users/emmanuelodeke/odeke@ualberta.ca/ENGINEERING/WINTER2017/binary.s: no such file or directory

This issue was fixed by PR #827.

  • introduced a debug print mode.
    This feature was implemented in PR #830.
    Using environment flag DRIVE_DEBUG=true (carefully chosen to avoid clashing with
    other programs that might rely on DEBUG), one can get debug information dumped to standard output.
    The main purpose of this feature is to aid in easy debugging and particularly to alleviate
    #829 in which the reporter could have been informed ASAP
    that their directory had a .gd directory instead of them having to use their mental microscope
    to figure out what went wrong.

    Typical output will look like

    $ DEBUG=true drive list share-testing/
    [/Users/emmanuelodeke/go/src/github.com/odeke-em/drive/cmd/drive/main.go:main.discoverContext:1857]
    contextPath: /Users/emmanuelodeke/emm.odeke@gmail.com/share-testing
    [/Users/emmanuelodeke/go/src/github.com/odeke-em/drive/cmd/drive/main.go:main.discoverContext:1867]
    driveRoot: "/Users/emmanuelodeke/emm.odeke@gmail.com" relToRoot: ""
    
    [/Users/emmanuelodeke/go/src/github.com/odeke-em/drive/src/rc.go:github.com/odeke-em/drive/src.ResourceMappings:92]
    RCPath: /Users/emmanuelodeke/emm.odeke@gmail.com/share-testing/.driverc
    [/Users/emmanuelodeke/go/src/github.com/odeke-em/drive/src/rc.go:github.com/odeke-em/drive/src.ResourceMappings:108]
    parsedContent from
    "/Users/emmanuelodeke/emm.odeke@gmail.com/share-testing/.driverc"
    {
    "global": {
      "depth": -1
    }
    }
    [Commands.List] #0 "/share-testing"
    -- owner       175.00B    0Bwu8laYc9RTPa28zVk9Td2hTVWc    2016-06-30
    15:32:25 +0000 UTC  /share-testing/SciqPCKrhi.go
    -- owner       309.00B    0Bwu8laYc9RTPTXRYblNqQXBSQzQ    2016-02-03
    08:12:15 +0000 UTC  /share-testing/outf.go
    -s owner       39.70KB    0Bwu8laYc9RTPOVNSeElpdFBpS2M    2012-02-02
    12:00:00 +0000 UTC  /share-testing/ComedyPunchlineDrumSound.mp3

Binaries

$ make
CGO_ENABLED=0 GOOS=linux GOARM=5 GOARCH=arm go build -o ./bin/drive_armv5 ./cmd/drive
CGO_ENABLED=0 GOOS=linux GOARM=6 GOARCH=arm go build -o ./bin/drive_armv6 ./cmd/drive
CGO_ENABLED=0 GOOS=linux GOARM=7 GOARCH=arm go build -o ./bin/drive_armv7 ./cmd/drive
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./bin/drive_armv8 ./cmd/drive
CGO_ENABLED=0 GOOS=darwin go build -o ./bin/drive_darwin ./cmd/drive
CGO_ENABLED=0 GOOS=linux go build -o ./bin/drive_linux ./cmd/drive
rm -f ./bin/md5Sums.txt
find ./bin -type f -name "drive_*" -exec md5 {} >> ./bin/md5Sums.txt \;
cat ./bin/md5Sums.txt
MD5 (./bin/drive_armv5) = 990d899bdff2e54cd401ece624a4f8be
MD5 (./bin/drive_armv6) = 812689b6bb2113948c8394854bbde47f
MD5 (./bin/drive_armv7) = 222be8926c35353f81baba014d926c71
MD5 (./bin/drive_armv8) = ecc56e8df5af018eab40097d261e862d
MD5 (./bin/drive_darwin) = 4b2528c13a5fb955bf28f48beec197ca
MD5 (./bin/drive_linux) = a192d38419377aa27a45d90055c56a14

This release as mentioned is the first of a new year 2017! Hoping for brighter days and more stability, and more user engagement. Our customers, the drive community deserve to have the best commandline client
for Google Drive and that's a constant that we all strive for!
Thank you very much everyone for your patience, contributions, analysis, encouragement, critic, ideas etc.

In particular, I'd like to give a shout to @jean-christophe-manciot for finding many bugs and for all the feedback!

This is a dawn of a new era, let's go for it!! Happy New Year!
obamabiden

Don't miss a new drive release

NewReleases is sending notifications on new releases.