260 Commits

Author SHA1 Message Date
Sybren A. Stüvel
99389e8ece Bumped version to 1.3.1 2021-02-04 12:01:53 +01:00
Sybren A. Stüvel
dd257bad6f Remove assertion that library blend files always exist
Remove an assertion that would cause BAT to raise and exception and halt
when a library blend file is missing. This assertion was fine for aiding
the coding of the library, but now gets in the way of tracing dependencies
of partially checked-out projects.
2021-02-04 11:15:27 +01:00
Sybren A. Stüvel
0a5a50ccf0 Bumped version to 1.3 2021-02-02 13:42:09 +01:00
Sybren A. Stüvel
23dea91572 Add support for indirectly linked Geometry Nodes node trees 2021-02-02 13:41:39 +01:00
Sybren A. Stüvel
e4bf2e8e35 Improved path handling
This commit fixes a bunch of issues at the same time, as they are all
related to path handling:

- `pathlib.Path.resolve()` or `.absolute()` are replaced by
  `bpathlib.make_absolute()`. The latter does NOT follow symlinks and does
  NOT network mounts from a drive letter to UNC notation. This also has
  advantages on non-Windows sytems, as it allows BAT-packing a directory
  structure with symlinked files (such as a Shaman checkout).
- Better handling of drive letters, and of paths that cross drive
  boundaries.
- Better testing of Windows-specific cases when running the tests on
  Windows, and of POSIX-specific cases on other platforms.

Thanks to @wisaac for starting this patch in D6676.

Thanks to @jbakker for pointing out the drive letter issue. This fixes
T70655.
2020-03-17 17:15:19 +01:00
Sybren A. Stüvel
3fa4389658 Bumped version to 1.3-dev0 2020-03-17 17:14:00 +01:00
Sybren A. Stüvel
ad14de92a8 Bumped version to 1.2.2 2019-10-10 10:35:41 +02:00
Sybren A. Stüvel
0b92037973 Bumped version to 1.2.1
Version 1.2 already existed on pypi by accident.
2019-10-09 08:58:55 +02:00
Sybren A. Stüvel
2e0cfa968b Bumped version to 1.2 2019-10-09 08:56:49 +02:00
Sybren A. Stüvel
23643ace13 Remove unnecessary dictionary lookup
This may also fix a Windows compatibility issue related to path
normalisation. Untested as it's hard to reproduce, but at least it
shouldn't hurt either.
2019-09-27 12:20:15 +02:00
Sybren A. Stüvel
e7cd6ab70d Fix external smoke caches not being packed 2019-09-27 12:19:22 +02:00
Sybren A. Stüvel
5988f3599a Fix T69976: BAT does not work with FluidSimModifier in Blender 2.81
The `point_cache` pointer was removed from Blender in
{rBd663ec48c06a083de74e90dd9c605e98b28baa37}, and was unused before that
commit.
2019-09-26 12:26:42 +02:00
Sybren A. Stüvel
af63f9c3c8 Allow setting Shaman JWT token in SHAMAN_JWT_TOKEN environment variable
I also removed the unused `shaman/auth.py` file.
2019-09-24 11:49:48 +02:00
Sybren A. Stüvel
113b0c9bb8 Fix T65904: External files with same path on different drives are packed once
External files with the same path on different drives are packed as a
single file. In this commit the drive letter is taken into account when
determining the path inside `_outside_project`, so that they are distinct.
2019-06-26 14:37:29 +02:00
Sybren A. Stüvel
f0836417a4 Bumped version to 1.2-dev0 2019-06-12 11:49:27 +02:00
Sybren A. Stüvel
f40f7585ed Prevent error when modifying actions dict 2019-06-07 12:35:41 +02:00
Sybren A. Stüvel
37fc7f467a Fix exception when having project on a mapped network drive in Windows 2019-06-07 12:35:41 +02:00
Sybren A. Stüvel
c2e3aea3f6 Bumped version to 1.1.1 2019-04-18 12:04:51 +02:00
Sybren A. Stüvel
acd5a18bed Import urllib3 from requests.packages.urllib3
This is for compatibility with Blender 2.79.
2019-04-18 12:04:03 +02:00
Sybren A. Stüvel
9fdfbc9bb3 Bumped version to 1.1 2019-03-25 17:46:53 +01:00
Sybren A. Stüvel
b418aaf3c4 Bumped version to 1.1.dev2 2019-03-20 13:58:23 +01:00
Sybren A. Stüvel
4964745dee Support Alembic files from linked library
We already supported Alembic files in the top-level blend file, but now we
also support finding Alembic files in linked-in libraries.
2019-03-20 13:57:44 +01:00
Sybren A. Stüvel
c718fb3a41 Support the Mesh Sequence Cache modifier (a.k.a. Alembic files) 2019-03-20 11:14:23 +01:00
Sybren A. Stüvel
6ac117cd37 Formatting 2019-03-20 11:12:47 +01:00
Sybren A. Stüvel
e9fcdb0191 Use exponential backoff when retrying HTTP connections 2019-03-06 16:21:30 +01:00
Sybren A. Stüvel
44ee553c0a Shaman: added some timeouts to HTTP requests 2019-03-06 16:00:46 +01:00
Sybren A. Stüvel
c2a8ff18f8 Bumped version to 1.1-dev1 2019-03-06 13:40:32 +01:00
Sybren A. Stüvel
10abeaea49 Fix ValueError when not requesting a checkout 2019-03-06 12:10:55 +01:00
Sybren A. Stüvel
dabb249e9b Python 3.5 fixes
`typing.Deque` was introduced in Python 3.6, so we can only use it when
we no longer support Blender 2.79.
2019-03-01 15:12:24 +01:00
Sybren A. Stüvel
7a7304d7a3 Shaman: Include original filename when uploading file 2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
a2f9a7b484 Shaman changed response does-not-existfile-unknown
Instead of 'does-not-exist' we'll now receive 'file-unknown' (see Shaman
commit 44efa6b39bddc703a14aa68316b092866813c38a)
2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
b22b9da5d0 Shaman: Moved URL parsing into a separate function
This allows other code to just call that function, rather than copying
the behaviour.
2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
f34bf7c66f When aborting, make sure the reason is available
This allows a GUI to display the reason of abortion.
2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
6104bd6078 Shaman: Make checkout location available to the Packer 2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
14417b2d73 Record bytes & files uploaded on Transferer 2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
9074421ec3 Shaman server support
The Shaman server is a file storage system that identifies files by
SHA256sum and file length. BAT can send packs there by only uploading
changed/new files. The BAT pack is reproduced at the Shaman server's
checkout directory by creating symlinks to the files in its file
storage.

Retrying sending files:

When we can defer uploading a file (that is, when we have other files to
upload as well, and we could send the current file at a later moment) we
send an `X-Shaman-Can-Defer-Upload: true` header in the file upload
request. In that case, when someone else is already uploading that file,
a `208 Already Reported` response is sent and the connection is closed.
Python's Requests library unfortunately won't give us that response if
we're still streaming the request, and raise a ConnectionError exception
instead. This exception can mean two things:

- If the `X-Shaman-Can-Defer-Upload: true` header was sent: someone else
  is currently uploading that file, so defer it.
- If that header was not sent: that file is already completely uploaded
  and does not need to be uploaded again.

Instead of retrying each failed file, after a few failures we now just
resend the definition file to get a new list of files to upload, then
send those. This should considerably reduce the number of HTTP calls
when multiple clients are uploading the same set of files.
2019-03-01 14:07:24 +01:00
Sybren A. Stüvel
3dd4ff5ba6 Bumped version to 1.1-dev0 2019-03-01 14:07:12 +01:00
Sybren A. Stüvel
c8337f5098 Bumped version to 1.0
This is the same version as 0.99, just released as 1.0 to note the
maturity of the code (it's been used successfully for months at the Blender
Animation Studio).
2019-03-01 14:03:55 +01:00
Sybren A. Stüvel
8dede717c6 Bumped version to 0.99 2019-02-26 16:45:43 +01:00
Sybren A. Stüvel
add5cf930b Include error message with error status 2019-02-26 16:35:55 +01:00
Sybren A. Stüvel
03fb4da583 Convert target path from Path to str & PurePath
The target path is just read as string from the CLI now, to allow more
complex targets (such as URLs) that don't directly map to a path.

The Packer subclass now handles the conversion from that string to a
`pathlib.PurePath`, and specific subclasses & transfer classes can convert
those to a `pathlib.Path` to perform actual filesystem operations when
necessary.
2019-02-26 16:35:08 +01:00
Sybren A. Stüvel
c4a0d5925a Use 'bat-' prefix when creating temporary directories 2019-02-26 16:35:08 +01:00
Sybren A. Stüvel
e9e1cfd8f5 Removed unused imports 2019-02-26 14:49:54 +01:00
Sybren A. Stüvel
d5d9c7f52f Clarified comment 2019-02-12 12:48:02 +01:00
Sybren A. Stüvel
dcc992f1cd Bumped version to 0.9 2019-02-12 12:31:51 +01:00
Sybren A. Stüvel
66681a69df Fixed crash where collection children are ID blocks instead of GR blocks
Not sure when/how that happens, but it happened on a lighting file of the
Spring project, when linking in a nested collection of which parts where
also linked in from other blend files.
2019-02-12 12:31:05 +01:00
Sybren A. Stüvel
ee29184b3c Removed unused FileCopierPool class 2019-02-04 15:34:29 +01:00
Sybren A. Stüvel
1434a9ee5d Added --sha256 and --timing options to bat list
These are only temporary features for aiding in development.
2019-02-04 15:30:52 +01:00
Sybren A. Stüvel
55a14eca1b Removed some extraneous commas 2019-02-04 15:17:14 +01:00
Sybren A. Stüvel
daab1df826 Use a priority queue instead of repeatedly sorting a deque 2019-02-04 15:17:07 +01:00