{"thread":{"id":"14785","subject":"stgit and rm a file","startedAt":"2008-08-01T02:02:13Z","lastAt":"2008-08-04T14:43:54Z","messageCount":5,"participants":["Jon Smirl","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"85851","messageId":"9e4733910807311902nd3a02bep68c8a26a7e6303cd@mail.gmail.com","threadId":"14785","inReplyTo":null,"subject":"stgit and rm a file","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-08-01T02:02:13Z","receivedAt":"2008-08-01T02:02:13Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"Make a new patch, git rm a file, refresh. It won't pick up the rm. Do\nsomething else besides just a rm and it will pick up the rm. Is it\nalready fixed in the much anticipated refresh rewrite?\n\njonsmirl@terra:~/fs$ stg --version\nStacked GIT 0.14.3.173.g2e37\ngit version 1.6.0.rc0\nPython version 2.5.2 (r252:60911, Apr 21 2008, 11:17:30)\n[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]\njonsmirl@terra:~/fs$\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"86184","messageId":"20080804134050.19457.96613.stgit@yoghurt","threadId":"14785","inReplyTo":"9e4733910807311902nd3a02bep68c8a26a7e6303cd@mail.gmail.com","subject":"[StGit PATCH] Add some tests of refreshing removed files","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-08-04T13:41:48Z","receivedAt":"2008-08-04T13:41:48Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"Signed-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\nThese four tests all pass on Catalin's current master. Do they fail\nfor you, or did I miss something in your problem description?\n\n t/t2702-refresh-rm.sh |  101 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 101 insertions(+), 0 deletions(-)\n create mode 100755 t/t2702-refresh-rm.sh\n\n\ndiff --git a/t/t2702-refresh-rm.sh b/t/t2702-refresh-rm.sh\nnew file mode 100755\nindex 0000000..896ebf3\n--- /dev/null\n+++ b/t/t2702-refresh-rm.sh\n@@ -0,0 +1,101 @@\n+#!/bin/sh\n+\n+test_description='\"stg refresh\" with removed files'\n+\n+. ./test-lib.sh\n+\n+# Ignore our own temp files.\n+cat >> .git/info/exclude <<EOF\n+expected*.txt\n+files*.txt\n+status*.txt\n+EOF\n+\n+reset () {\n+    stg pop -a > /dev/null\n+    git reset --hard > /dev/null\n+}\n+\n+test_expect_success 'Initialize StGit stack' '\n+    stg init &&\n+    echo x > x.txt &&\n+    echo y > y.txt &&\n+    git add x.txt y.txt &&\n+    git commit -m \"Add some files\"\n+'\n+\n+cat > expected0.txt <<EOF\n+D y.txt\n+EOF\n+printf '' > expected1.txt\n+test_expect_success 'git-rm a file' '\n+    stg new -m p0 &&\n+    git rm y.txt &&\n+    stg status > status0.txt &&\n+    test_cmp expected0.txt status0.txt &&\n+    stg refresh &&\n+    stg status > status1.txt &&\n+    test_cmp expected1.txt status1.txt &&\n+    stg files | sort > files.txt &&\n+    test_cmp expected0.txt files.txt\n+'\n+\n+reset\n+\n+cat > expected0.txt <<EOF\n+D y.txt\n+M x.txt\n+EOF\n+printf '' > expected1.txt\n+test_expect_success 'git-rm a file together with other changes' '\n+    stg new -m p1 &&\n+    echo x2 >> x.txt &&\n+    git rm y.txt &&\n+    stg status > status0.txt &&\n+    test_cmp expected0.txt status0.txt &&\n+    stg refresh &&\n+    stg status > status1.txt &&\n+    test_cmp expected1.txt status1.txt &&\n+    stg files | sort > files.txt &&\n+    test_cmp expected0.txt files.txt\n+'\n+\n+reset\n+\n+cat > expected0.txt <<EOF\n+D y.txt\n+EOF\n+printf '' > expected1.txt\n+test_expect_success 'rm a file' '\n+    stg new -m p2 &&\n+    rm y.txt &&\n+    stg status > status0.txt &&\n+    test_cmp expected0.txt status0.txt &&\n+    stg refresh &&\n+    stg status > status1.txt &&\n+    test_cmp expected1.txt status1.txt &&\n+    stg files | sort > files.txt &&\n+    test_cmp expected0.txt files.txt\n+'\n+\n+reset\n+\n+cat > expected0.txt <<EOF\n+D y.txt\n+M x.txt\n+EOF\n+printf '' > expected1.txt\n+test_expect_success 'rm a file together with other changes' '\n+    stg new -m p3 &&\n+    echo x2 >> x.txt &&\n+    rm y.txt &&\n+    stg status > status0.txt &&\n+    test_cmp expected0.txt status0.txt &&\n+    stg refresh &&\n+    stg status > status1.txt &&\n+    test_cmp expected1.txt status1.txt &&\n+    stg files | sort > files.txt &&\n+    test_cmp expected0.txt files.txt\n+'\n+\n+test_done\n"},{"id":"86189","messageId":"9e4733910808040707u2ef8992eha629ebca9c41730b@mail.gmail.com","threadId":"14785","inReplyTo":"20080804134050.19457.96613.stgit@yoghurt","subject":"Re: [StGit PATCH] Add some tests of refreshing removed files","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-08-04T14:07:45Z","receivedAt":"2008-08-04T14:07:45Z","isPatch":true,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 8/4/08, Karl Hasselström <kha@treskal.com> wrote:\n> Signed-off-by: Karl Hasselström <kha@treskal.com>\n>\n>  ---\n>\n>  These four tests all pass on Catalin's current master. Do they fail\n>  for you, or did I miss something in your problem description?\n\nI just updated to current git and stg and retested. Tracking a remove\nis working now for me. Tools were about three months old before\nupdating.\n\nNot sure what changed. But I definitely couldn't get stgit to do it\nand had to use git commands to generate the patch. I would remove the\nfile, refresh and the patch was empty.\nstg status would show the file in D state.  As soon as I touched\nsomething else and refreshed the rm would appear in the patch.\n\nMaybe there is more to the triggering sequence than a simple rm. I'll\nkeep a watch out and see if I can figure out how I got into the state.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"86190","messageId":"9e4733910808040708k69802d6w120fd88df7f92b7b@mail.gmail.com","threadId":"14785","inReplyTo":"9e4733910808040707u2ef8992eha629ebca9c41730b@mail.gmail.com","subject":"Re: [StGit PATCH] Add some tests of refreshing removed files","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-08-04T14:08:58Z","receivedAt":"2008-08-04T14:08:58Z","isPatch":true,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 8/4/08, Jon Smirl <jonsmirl@gmail.com> wrote:\n> On 8/4/08, Karl Hasselström <kha@treskal.com> wrote:\n>  > Signed-off-by: Karl Hasselström <kha@treskal.com>\n>  >\n>  >  ---\n>  >\n>  >  These four tests all pass on Catalin's current master. Do they fail\n>  >  for you, or did I miss something in your problem description?\n>\n>\n> I just updated to current git and stg and retested. Tracking a remove\n>  is working now for me. Tools were about three months old before\n>  updating.\n>\n>  Not sure what changed. But I definitely couldn't get stgit to do it\n>  and had to use git commands to generate the patch. I would remove the\n>  file, refresh and the patch was empty.\n>  stg status would show the file in D state.  As soon as I touched\n>  something else and refreshed the rm would appear in the patch.\n\nThe file I was trying to rm was a hidden file, .mailmap\n\n>\n>  Maybe there is more to the triggering sequence than a simple rm. I'll\n>  keep a watch out and see if I can figure out how I got into the state.\n>\n>\n>  --\n>  Jon Smirl\n>  jonsmirl@gmail.com\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"86194","messageId":"20080804144354.GE12232@diana.vm.bytemark.co.uk","threadId":"14785","inReplyTo":"9e4733910808040707u2ef8992eha629ebca9c41730b@mail.gmail.com","subject":"Re: [StGit PATCH] Add some tests of refreshing removed files","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-08-04T14:43:54Z","receivedAt":"2008-08-04T14:43:54Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-08-04 10:07:45 -0400, Jon Smirl wrote:\n\n> I just updated to current git and stg and retested. Tracking a\n> remove is working now for me.\n\nWell, that's good.\n\n> Tools were about three months old before updating.\n\nMight have been fixed by 8fe07fa4cef (Handle refresh of changed files\nwith non-ASCII names) or 466bfe50 (Fix \"refresh\" failure with moved\nfiles (bug 11661)).\n\n> Not sure what changed. But I definitely couldn't get stgit to do it\n> and had to use git commands to generate the patch. I would remove\n> the file, refresh and the patch was empty. stg status would show the\n> file in D state. As soon as I touched something else and refreshed\n> the rm would appear in the patch.\n\nWell, that's exactly what my new test tests for. So at least i got it\nright.\n\n> Maybe there is more to the triggering sequence than a simple rm.\n> I'll keep a watch out and see if I can figure out how I got into the\n> state.\n\nThanks.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}