]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
pwclient/get: Add suffix to created patch
authorPetr Vorel <petr.vorel@gmail.com>
Fri, 15 Jun 2018 13:52:41 +0000 (15:52 +0200)
committerStephen Finucane <stephen@that.guru>
Mon, 18 Jun 2018 16:43:20 +0000 (17:43 +0100)
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/bin/pwclient
releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml [new file with mode: 0644]

index 29cad89691657b7c96eebfcae192b1f02e1c1455..79137b0d0c39c6f40ced6978cd217e4ff23513c0 100755 (executable)
@@ -305,9 +305,10 @@ def action_get(rpc, patch_id):
         sys.exit(1)
 
     base_fname = fname = os.path.basename(patch['filename'])
+    fname += '.patch'
     i = 0
     while os.path.exists(fname):
-        fname = "%s.%d" % (base_fname, i)
+        fname = "%s.%d.patch" % (base_fname, i)
         i += 1
 
     with io.open(fname, 'w', encoding='utf-8') as f:
diff --git a/releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml b/releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml
new file mode 100644 (file)
index 0000000..8e6d68f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+features:
+  - |
+    The ``pwclient get`` command will now download patches with a ``.patch``
+    extension.