Open luc14n0 opened 1 year ago
There's only one issue with one of my last iterations. When using the service in the CLI fails:
$ /usr/lib/obs/service/obs_scm --url https://gitlab.gnome.org/Incubator/loupe.git --scm git --revision refs/tags/44[2/365]
rsionformat @PARENT_TAG@+@TAG_OFFSET@ --versionrewrite-pattern '(.*)\+0' --versionrewrite-replacement \1 --changesgenerate
enable --changesauthor 'Geeko Packager' --changesemail geeko@opensuse.org --outdir $PWD
Cloning into '/home/luc14n0/dev/obs/luc14n0/branches/GNOME/Next/loupe/tmpydayww3d/loupe'...
Updating files: 100% (81/81), done.
8f2bd8de833168e9b64512d03d91ce82fd7081ba
Traceback (most recent call last):
File "/usr/lib/obs/service/obs_scm", line 30, in <module>
main()
File "/usr/lib/obs/service/obs_scm", line 26, in main
TarSCM.run()
File "/usr/lib/obs/service/TarSCM/__init__.py", line 39, in run
task_list.process_list()
File "/usr/lib/obs/service/TarSCM/tasks.py", line 131, in process_list
self.process_single_task(task)
File "/usr/lib/obs/service/TarSCM/tasks.py", line 261, in process_single_task
self._process_changes(args,
File "/usr/lib/obs/service/TarSCM/tasks.py", line 297, in _process_changes
shutil.copy(filename, new_changes_file)
File "/usr/lib64/python3.10/shutil.py", line 417, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib64/python3.10/shutil.py", line 234, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: 'loupe.changes' and '/home/luc14n0/dev/obs/luc14n0/branches/GNOME/Next/loupe/loupe.changes' are the
same file
I don't know why the commit messages aren't being written to the temporary .changes
file yet.
Ping!
Another ping!
This should bring us closer to how
osc vc
behaves:BEFORE:
AFTER:
The module in use here is
textwrap
and it's part of Python's Standard Library, so there's no need for extra dependencies. And unless there's a word longer than 67 characters or a hyphened compound word, words shouldn't get split.The modifications I did to
SystemExit()
should look like this, for thechangesauthor
:And for the newly introduced
changesemail
parameter: