{"thread":{"id":"16435","subject":"[PATCH] Display (empty) when appropriate for the goto command","startedAt":"2008-11-23T21:23:18Z","lastAt":"2008-11-24T11:19:09Z","messageCount":2,"participants":["Catalin Marinas","Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96391","messageId":"20081123212318.9835.53505.stgit@localhost.localdomain","threadId":"16435","inReplyTo":null,"subject":"[PATCH] Display (empty) when appropriate for the goto command","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2008-11-23T21:23:18Z","receivedAt":"2008-11-23T21:23:18Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"This is a fix for bug #11810. The original implementation of goto used\nto display (empty patch) when a patch became empty during a push + merge\noperation. This patch adds this feature again.\n\nSigned-off-by: Catalin Marinas <catalin.marinas@gmail.com>\n---\n stgit/lib/transaction.py |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/lib/transaction.py b/stgit/lib/transaction.py\nindex de62a8c..6623645 100644\n--- a/stgit/lib/transaction.py\n+++ b/stgit/lib/transaction.py\n@@ -290,7 +290,6 @@ class StackTransaction(object):\n         conflicts to them.\"\"\"\n         orig_cd = self.patches[pn].data\n         cd = orig_cd.set_committer(None)\n-        s = ['', ' (empty)'][cd.is_nochange()]\n         oldparent = cd.parent\n         cd = cd.set_parent(self.top)\n         base = oldparent.data.tree\n@@ -298,6 +297,7 @@ class StackTransaction(object):\n         theirs = cd.tree\n         tree, self.temp_index_tree = self.temp_index.merge(\n             base, ours, theirs, self.temp_index_tree)\n+        s = ''\n         merge_conflict = False\n         if not tree:\n             if iw == None:\n@@ -324,6 +324,8 @@ class StackTransaction(object):\n         else:\n             comm = None\n             s = ' (unmodified)'\n+        if not merge_conflict and cd.is_nochange():\n+            s = ' (empty)'\n         out.info('Pushed %s%s' % (pn, s))\n         def update():\n             if comm:\n"},{"id":"96412","messageId":"20081124111909.GB31986@diana.vm.bytemark.co.uk","threadId":"16435","inReplyTo":"20081123212318.9835.53505.stgit@localhost.localdomain","subject":"Re: [PATCH] Display (empty) when appropriate for the goto command","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-11-24T11:19:09Z","receivedAt":"2008-11-24T11:19:09Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-11-23 21:23:18 +0000, Catalin Marinas wrote:\n\n> This is a fix for bug #11810. The original implementation of goto\n> used to display (empty patch) when a patch became empty during a\n> push + merge operation. This patch adds this feature again.\n>\n> Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>\n\nAcked-by: Karl Hasselström <kha@treskal.com>\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}