bitcoin-maintainer-tools icon indicating copy to clipboard operation
bitcoin-maintainer-tools copied to clipboard

Stop leaving behind `*.orig` files

Open katesalazar opened this issue 3 years ago • 6 comments

Closes ticket #101.

Ticket #101 reads:

update-translations.py script leaves behind *.orig files.

After running python3 ../bitcoin-maintainer-tools/update-translations.py tons of *.orig files remain in the repo. They are ignored by Git due to the .gitignore but they are not subjects for make clean or make distclean.

[...]

katesalazar avatar Jan 26 '22 10:01 katesalazar

Guesses ticket #101.

What do you mean by guesses? If you haven't even tested if you change works, please don't open a PR..

fanquake avatar Jan 26 '22 10:01 fanquake

remove_orig_files() is called in two places after this. Is this on purpose? It doesn't seem necessary as the files aren't created twice, right?

laanwj avatar Mar 01 '22 16:03 laanwj

remove_orig_files() is called in two places after this. Is this on purpose?

yeah

It doesn't seem necessary as the files aren't created twice, right?

right

pushing this:

diff --git a/update-translations.py b/update-translations.py
index 603bd8a..93ec4a8 100755
--- a/update-translations.py
+++ b/update-translations.py
@@ -57,7 +57,7 @@ def remove_current_translations():
     '''
     for (_,name) in all_ts_files():
         os.remove(name)
-    remove_orig_files()
+    remove_orig_files()  # TODO interim, remove eventually
 
 def remove_orig_files():
     for (_,name) in all_ts_files(suffix=ORIGINAL_SUFFIX):

katesalazar avatar Mar 09 '22 23:03 katesalazar

@hebasto nailed it

katesalazar avatar Oct 16 '22 10:10 katesalazar

oof, sloppy me

On Mon, Oct 17, 2022 at 10:35 AM Hennadii Stepanov @.***> wrote:

@.**** commented on this pull request.

Approach ACK 478bb5e https://github.com/bitcoin-core/bitcoin-maintainer-tools/commit/478bb5ef90acba7bd1bc8dca03eee805d0973c37 .

The following comment needs to be updated as well https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/478bb5ef90acba7bd1bc8dca03eee805d0973c37/update-translations.py#L54-L58

— Reply to this email directly, view it on GitHub https://github.com/bitcoin-core/bitcoin-maintainer-tools/pull/126#pullrequestreview-1143723274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRS4W2J7VF5EAWDHJIPR73WDUFWJANCNFSM5M2V2XFA . You are receiving this because you were mentioned.Message ID: @.*** com>

katesalazar avatar Oct 17 '22 17:10 katesalazar

Done, hopefully, @hebasto. Thank you kindly.

On Mon, Oct 17, 2022 at 10:35 AM Hennadii Stepanov @.***> wrote:

@.**** commented on this pull request.

Approach ACK 478bb5e https://github.com/bitcoin-core/bitcoin-maintainer-tools/commit/478bb5ef90acba7bd1bc8dca03eee805d0973c37 .

The following comment needs to be updated as well https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/478bb5ef90acba7bd1bc8dca03eee805d0973c37/update-translations.py#L54-L58

— Reply to this email directly, view it on GitHub https://github.com/bitcoin-core/bitcoin-maintainer-tools/pull/126#pullrequestreview-1143723274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRS4W2J7VF5EAWDHJIPR73WDUFWJANCNFSM5M2V2XFA . You are receiving this because you were mentioned.Message ID: @.*** com>

katesalazar avatar Oct 17 '22 17:10 katesalazar

@hebasto happy for this to be merged as-is?

fanquake avatar Oct 31 '22 16:10 fanquake

@hebasto happy for this to be merged as-is?

Yes.

hebasto avatar Oct 31 '22 16:10 hebasto