LiveSync 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {LiveSync-0.3.2.dist-info → LiveSync-0.3.3.dist-info}/METADATA +1 -1
- {LiveSync-0.3.2.dist-info → LiveSync-0.3.3.dist-info}/RECORD +7 -7
- livesync/folder.py +8 -3
- {LiveSync-0.3.2.dist-info → LiveSync-0.3.3.dist-info}/LICENSE +0 -0
- {LiveSync-0.3.2.dist-info → LiveSync-0.3.3.dist-info}/WHEEL +0 -0
- {LiveSync-0.3.2.dist-info → LiveSync-0.3.3.dist-info}/entry_points.txt +0 -0
- {LiveSync-0.3.2.dist-info → LiveSync-0.3.3.dist-info}/top_level.txt +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
livesync/__init__.py,sha256=tZrvnAIpVuo9cQHMCvi6l2vup66NXPxRwyR5UBNtCTs,50
|
|
2
|
-
livesync/folder.py,sha256=
|
|
2
|
+
livesync/folder.py,sha256=E_HWXLW40fhoCW_NQh6liEe3gSW9ckIga6rYdQ3DEzc,4351
|
|
3
3
|
livesync/livesync.py,sha256=2kNwtM3a1r5moAXCD4BcK0UJYa0EdZP5PTUNiEqKI6g,1294
|
|
4
4
|
livesync/mutex.py,sha256=nHaP0Tge3ZV7jyVBbYsMug5L5YkuJf8_XIbfAdVJkPc,1741
|
|
5
5
|
livesync/run_subprocess.py,sha256=ZZqK9dlOVlJhL0xkKN7bG-BAT558nHk-IJNGqIMeWyM,368
|
|
6
6
|
livesync/sync.py,sha256=9cQwtdLHIBvenzyq0HRJOagPm1OGSDpi43vLBa2aNUs,1635
|
|
7
|
-
LiveSync-0.3.
|
|
8
|
-
LiveSync-0.3.
|
|
9
|
-
LiveSync-0.3.
|
|
10
|
-
LiveSync-0.3.
|
|
11
|
-
LiveSync-0.3.
|
|
12
|
-
LiveSync-0.3.
|
|
7
|
+
LiveSync-0.3.3.dist-info/LICENSE,sha256=QcBlwggRQYhvfTAE481AAMFQfMS_N6Bj8Svh1T6dsnI,1072
|
|
8
|
+
LiveSync-0.3.3.dist-info/METADATA,sha256=cke14IwKy3EKV267y4lceiPRLvyWqjBIY_f-0_7ZG-g,5335
|
|
9
|
+
LiveSync-0.3.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
10
|
+
LiveSync-0.3.3.dist-info/entry_points.txt,sha256=4dn5YR27lUlJWea3yqLKLqR4MwqjcqzMR5Q4jVFnytI,52
|
|
11
|
+
LiveSync-0.3.3.dist-info/top_level.txt,sha256=mLwExc6wTUGqxvUkYMio5rxGS1h8bvxpNsR2ebfjSL4,9
|
|
12
|
+
LiveSync-0.3.3.dist-info/RECORD,,
|
livesync/folder.py
CHANGED
|
@@ -55,17 +55,22 @@ class Folder:
|
|
|
55
55
|
path = self.source_path / '.syncignore'
|
|
56
56
|
if not path.is_file():
|
|
57
57
|
path.write_text('\n'.join(self.DEFAULT_IGNORES))
|
|
58
|
-
|
|
58
|
+
ignores = [line.strip() for line in path.read_text().splitlines() if not line.startswith('#')]
|
|
59
|
+
ignores += [ignore.rstrip('/\\') for ignore in ignores if ignore.endswith('/') or ignore.endswith('\\')]
|
|
60
|
+
return ignores
|
|
59
61
|
|
|
60
62
|
def get_summary(self) -> str:
|
|
61
63
|
summary = f'{self.source_path} --> {self.target}\n'
|
|
62
64
|
try:
|
|
65
|
+
cmd = ['git', 'rev-parse', '--is-inside-work-tree']
|
|
66
|
+
subprocess.run(cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
67
|
+
except subprocess.CalledProcessError:
|
|
68
|
+
pass # not a git repo, git is not installed, or something else
|
|
69
|
+
else:
|
|
63
70
|
cmd = ['git', 'log', '--pretty=format:[%h]\n', '-n', '1']
|
|
64
71
|
summary += subprocess.check_output(cmd, cwd=self.source_path).decode()
|
|
65
72
|
cmd = ['git', 'status', '--short', '--branch']
|
|
66
73
|
summary += subprocess.check_output(cmd, cwd=self.source_path).decode().strip() + '\n'
|
|
67
|
-
except Exception:
|
|
68
|
-
pass # not a git repo, git is not installed, or something else
|
|
69
74
|
return summary
|
|
70
75
|
|
|
71
76
|
async def watch(self) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|