git2svn 0.7.0__tar.gz → 0.7.1__tar.gz

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.
Files changed (51) hide show
  1. {git2svn-0.7.0/git2svn.egg-info → git2svn-0.7.1}/PKG-INFO +1 -1
  2. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/_version.py +2 -2
  3. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/colors.py +15 -11
  4. {git2svn-0.7.0 → git2svn-0.7.1/git2svn.egg-info}/PKG-INFO +1 -1
  5. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_colors.py +7 -7
  6. {git2svn-0.7.0 → git2svn-0.7.1}/.githooks/pre-commit +0 -0
  7. {git2svn-0.7.0 → git2svn-0.7.1}/.github/dependabot.yml +0 -0
  8. {git2svn-0.7.0 → git2svn-0.7.1}/.github/workflows/ci.yml +0 -0
  9. {git2svn-0.7.0 → git2svn-0.7.1}/.github/workflows/release.yml +0 -0
  10. {git2svn-0.7.0 → git2svn-0.7.1}/.gitignore +0 -0
  11. {git2svn-0.7.0 → git2svn-0.7.1}/.pre-commit-config.yaml +0 -0
  12. {git2svn-0.7.0 → git2svn-0.7.1}/CONTRIBUTING.md +0 -0
  13. {git2svn-0.7.0 → git2svn-0.7.1}/LICENSE.md +0 -0
  14. {git2svn-0.7.0 → git2svn-0.7.1}/README.md +0 -0
  15. {git2svn-0.7.0 → git2svn-0.7.1}/docs/arc42/README.md +0 -0
  16. {git2svn-0.7.0 → git2svn-0.7.1}/docs/arc42/adrs.md +0 -0
  17. {git2svn-0.7.0 → git2svn-0.7.1}/docs/arc42/concepts.md +0 -0
  18. {git2svn-0.7.0 → git2svn-0.7.1}/docs/req42.md +0 -0
  19. {git2svn-0.7.0 → git2svn-0.7.1}/docs/user-guide/README.md +0 -0
  20. {git2svn-0.7.0 → git2svn-0.7.1}/docs/user-guide/commands.md +0 -0
  21. {git2svn-0.7.0 → git2svn-0.7.1}/docs/user-guide/integration-workflow.md +0 -0
  22. {git2svn-0.7.0 → git2svn-0.7.1}/docs/user-guide/troubleshooting.md +0 -0
  23. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/__init__.py +0 -0
  24. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/__main__.py +0 -0
  25. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/cli.py +0 -0
  26. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/core.py +0 -0
  27. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/eol.py +0 -0
  28. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/git.py +0 -0
  29. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/patcher.py +0 -0
  30. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/py.typed +0 -0
  31. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/setup.py +0 -0
  32. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/state.py +0 -0
  33. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/status.py +0 -0
  34. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn/svn.py +0 -0
  35. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.egg-info/SOURCES.txt +0 -0
  36. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.egg-info/dependency_links.txt +0 -0
  37. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.egg-info/entry_points.txt +0 -0
  38. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.egg-info/requires.txt +0 -0
  39. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.egg-info/scm_file_list.json +0 -0
  40. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.egg-info/top_level.txt +0 -0
  41. {git2svn-0.7.0 → git2svn-0.7.1}/git2svn.py +0 -0
  42. {git2svn-0.7.0 → git2svn-0.7.1}/pyproject.toml +0 -0
  43. {git2svn-0.7.0 → git2svn-0.7.1}/setup.cfg +0 -0
  44. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_cli.py +0 -0
  45. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_core.py +0 -0
  46. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_e2e.py +0 -0
  47. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_eol.py +0 -0
  48. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_git.py +0 -0
  49. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_patcher.py +0 -0
  50. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_status.py +0 -0
  51. {git2svn-0.7.0 → git2svn-0.7.1}/tests/test_svn.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git2svn
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: CLI utility to synchronize changes from a local Git repository to a local SVN working copy
5
5
  Author: Simon
6
6
  License: Apache-2.0
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.7.0'
22
- __version_tuple__ = version_tuple = (0, 7, 0)
21
+ __version__ = version = '0.7.1'
22
+ __version_tuple__ = version_tuple = (0, 7, 1)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -104,16 +104,16 @@ class TerminalColor:
104
104
  def error(self, text: str = "Error") -> str:
105
105
  return self.bold_red(f"✖ {text}")
106
106
 
107
- def info_badge(self, text: str = "[INFO]") -> str:
107
+ def info_badge(self, text: str = "[INFO] ") -> str:
108
108
  return self.bold_cyan(text)
109
109
 
110
110
  def target_badge(self, text: str = "[TARGET]") -> str:
111
111
  return self.bold_cyan(text)
112
112
 
113
- def warn_badge(self, text: str = "[WARN]") -> str:
113
+ def warn_badge(self, text: str = "[WARN] ") -> str:
114
114
  return self.bold_yellow(text)
115
115
 
116
- def error_badge(self, text: str = "[ERROR]") -> str:
116
+ def error_badge(self, text: str = "[ERROR] ") -> str:
117
117
  return self.bold_red(text)
118
118
 
119
119
  def paused_badge(self, text: str = "[PAUSED]") -> str:
@@ -121,7 +121,7 @@ class TerminalColor:
121
121
 
122
122
 
123
123
  class ColoredLogFormatter(logging.Formatter):
124
- """Custom logging formatter that colorizes log level prefixes using TerminalColor."""
124
+ """Custom logging formatter that colorizes and aligns log level prefixes using TerminalColor."""
125
125
 
126
126
  def __init__(self, color: TerminalColor):
127
127
  super().__init__()
@@ -130,18 +130,22 @@ class ColoredLogFormatter(logging.Formatter):
130
130
  def format(self, record: logging.LogRecord) -> str:
131
131
  levelname = record.levelname
132
132
  msg = record.getMessage()
133
- if not self.color.enabled:
134
- return f"[{levelname}] {msg}"
135
133
 
134
+ # Format prefix aligned to 8 chars: e.g. [INFO] , [WARN] , [ERROR]
136
135
  if levelname == "INFO":
137
- badge = self.color.info_badge("[INFO]")
136
+ raw_tag = "[INFO] "
137
+ badge = self.color.info_badge(raw_tag) if self.color.enabled else raw_tag
138
138
  elif levelname in ("WARNING", "WARN"):
139
- badge = self.color.warn_badge(f"[{levelname}]")
139
+ raw_tag = "[WARN] "
140
+ badge = self.color.warn_badge(raw_tag) if self.color.enabled else raw_tag
140
141
  elif levelname in ("ERROR", "CRITICAL"):
141
- badge = self.color.error_badge(f"[{levelname}]")
142
+ raw_tag = "[ERROR] "
143
+ badge = self.color.error_badge(raw_tag) if self.color.enabled else raw_tag
142
144
  elif levelname == "DEBUG":
143
- badge = self.color.dim(f"[{levelname}]")
145
+ raw_tag = "[DEBUG] "
146
+ badge = self.color.dim(raw_tag) if self.color.enabled else raw_tag
144
147
  else:
145
- badge = f"[{levelname}]"
148
+ raw_tag = f"[{levelname}]".ljust(8)
149
+ badge = raw_tag
146
150
 
147
151
  return f"{badge} {msg}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git2svn
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: CLI utility to synchronize changes from a local Git repository to a local SVN working copy
5
5
  Author: Simon
6
6
  License: Apache-2.0
@@ -68,10 +68,10 @@ class TestTerminalColor(unittest.TestCase):
68
68
  self.assertIn("\033[", color_always.paused_badge())
69
69
 
70
70
  color_never = git2svn.TerminalColor(mode="never")
71
- self.assertEqual(color_never.info_badge(), "[INFO]")
71
+ self.assertEqual(color_never.info_badge(), "[INFO] ")
72
72
  self.assertEqual(color_never.target_badge(), "[TARGET]")
73
- self.assertEqual(color_never.warn_badge(), "[WARN]")
74
- self.assertEqual(color_never.error_badge(), "[ERROR]")
73
+ self.assertEqual(color_never.warn_badge(), "[WARN] ")
74
+ self.assertEqual(color_never.error_badge(), "[ERROR] ")
75
75
  self.assertEqual(color_never.paused_badge(), "[PAUSED]")
76
76
 
77
77
  def test_colored_log_formatter(self):
@@ -102,10 +102,10 @@ class TestTerminalColor(unittest.TestCase):
102
102
 
103
103
  # Mode: never
104
104
  fmt_never = git2svn.ColoredLogFormatter(git2svn.TerminalColor(mode="never"))
105
- self.assertEqual(fmt_never.format(record_info), "[INFO] info message")
106
- self.assertEqual(fmt_never.format(record_warn), "[WARNING] warn message")
107
- self.assertEqual(fmt_never.format(record_err), "[ERROR] err message")
108
- self.assertEqual(fmt_never.format(record_debug), "[DEBUG] debug message")
105
+ self.assertEqual(fmt_never.format(record_info), "[INFO] info message")
106
+ self.assertEqual(fmt_never.format(record_warn), "[WARN] warn message")
107
+ self.assertEqual(fmt_never.format(record_err), "[ERROR] err message")
108
+ self.assertEqual(fmt_never.format(record_debug), "[DEBUG] debug message")
109
109
 
110
110
 
111
111
  if __name__ == "__main__":
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes