XSF Discussion - 2011-04-26

  1. Vanaryon

    stpeter, hi, any possibility to pull XEP-0277? (or may I send it to you through email?)

  2. stpeter

    oh, I got an error when I followed Kev's instructions

  3. stpeter

    but sure, email it to stpeter @ stpeter.im

  4. Kev

    It's probably easier for Peter to apply it if you send it via email after formatting with `git format-patch`.

  5. Vanaryon

    stpeter, I found strange it wasn't pulled, that's why I ping you now ;)

  6. Vanaryon

    okay, will mail it

  7. stpeter


  8. Vanaryon

    thanks ;)

  9. Kev

    stpeter: To apply a mailed patch, easiest is just to view source, select all, copy, and in a terminal run `pbpaste | git am` and the patch will be ready applied.

  10. stpeter

    thanks for the tip :)

  11. Vanaryon


  12. Kev

    You can also save the email and git am /path/to/mail

  13. stpeter

    save the mail, or just the attachment?

  14. stpeter

    I saved the attachment and got this: $ git am ~/Desktop/xep-0277.xml Patch format detection failed.

  15. Kev

    If the mail is sent correctly, the whole mail is what you apply.

  16. stpeter

    ah ok

  17. Kev

    Feel free to forward to me to check.

  18. stpeter

    now I get: $ git am ~/Desktop/xep-0277.eml Patch is empty. Was it split wrong?

  19. stpeter


  20. Kev

    Forward and I can look :)

  21. stpeter


  22. stpeter

    it is pgp-signed, so it's got to be some kind of multipart mime insanity :)

  23. Vanaryon

    stpeter, do you want me to send it back without any pgp ?

  24. Kev

    Vanaryon: Are you generating it correctly with git format-patch, and then sending with git send-email?

  25. Vanaryon

    Kev, nope, I sent it from Evolution, my mail client

  26. Kev

    Ok, so you send the format-patch output as an attachment to a mail?

  27. Vanaryon

    I try with git format-patch

  28. Vanaryon


  29. Kev

    That will work fine too, it just means Peter has to apply the attachment instead of the whole mail.

  30. Kev

    But formatting the patch is necessary whichever way.

  31. Vanaryon

    Mhh I don't really understand how to proceed, git send-email does not exits

  32. Vanaryon


  33. Kev

    Then just use format-patch to create the patch, and send it to Peter as an attachment.

  34. Kev

    It's the format-patch bit that's the important part.

  35. stpeter

    sorry, I got interrupted here IRL, brb

  36. Vanaryon

    mhh, git format-patch returns me 0 bytes after stdout

  37. Kev

    Are you sure you're running it correctly?

  38. Kev

    It should be dumping the patches you ask it to files and then telling you what it did on stdout.

  39. Vanaryon

    the problem is that I pushed the commit this morning to my repo.

  40. Vanaryon

    So there's nothing to patch, according to git

  41. Kev

    So what command are you running?

  42. Vanaryon

    only git format-patch, in the root of the repositery

  43. Kev

    I think the manpage tells you you can't do that :p

  44. Kev

    DESCRIPTION Prepare each commit with its patch in one file per commit, formatted to resemble UNIX mailbox format. The output of this command is convenient for e-mail submission or for use with git am. There are two ways to specify which commits to operate on. 1. A single commit, <since>, specifies that the commits leading to the tip of the current branch that are not in the history that leads to the <since> to be output. 2. Generic <revision range> expression (see "SPECIFYING REVISIONS" section in gitrevisions(7)) means the commits in the specified range.

  45. Kev

    So git format-patch HEAD\^ will give you a file that Peter can apply for the topmost commit in your tree.

  46. Kev

    git format-patch xsf/master will give you patches for every commit in your tree that isn't in the 'master' branch on the 'xsf' remote (if you've set one up)

  47. Vanaryon

    I got it

  48. Vanaryon

    okay, downloading xsf:master rep.

  49. Vanaryon

    mhh I can't get it

  50. Vanaryon

    Maybe is it simpler if stpeter update it by pasting the xep-0277.xml file?

  51. Kev

    How many commits is it?

  52. Kev

    (That you want him to push)

  53. Vanaryon


  54. Kev

    Then git format-patch HEAD\~3 should sort it out.

  55. Vanaryon

    done :)

  56. Kev

    Attach those to a mail to Peter.

  57. stpeter sighs over standards@ traffic

  58. Kev

    Peter can then save the three attachments, run git am /path/to/attachments and all will be well with the world.

  59. Vanaryon

    stpeter, I mail you the three patch files?

  60. stpeter

    yes please

  61. Vanaryon


  62. stpeter


  63. stpeter

    gotta love git error messages: $ git am ~/Documents/tmp/patches/ previous rebase directory /Users/stpeter/Documents/git/xmpp/.git/rebase-apply still exists but mbox given.

  64. Kev


  65. Kev

    You're in the middle of a failed git am aren't you?

  66. Kev

    Try something like git am --abort

  67. stpeter


  68. Kev

    It should have given you some warning about this on the previous run, but maybe it decided not to.

  69. stpeter

    ok seems to have worked now

  70. stpeter checks

  71. stpeter

    but I'm changing 0.2.1 and 0.2.2 to 0.3 :)

  72. Kev


  73. stpeter

    in the spec

  74. stpeter

    we don't really use the minor version numbers

  75. Kev

    So it's a problem with the submitted patch, rather than that Git has screwed up, right?

  76. stpeter


  77. stpeter


  78. stpeter

    wasn't clear

  79. Kev

    Oh, well, want to see a neat trick, then? :)

  80. stpeter

    I do!

  81. Kev

    You can git rebase -i origin/master

  82. Kev

    That'll let you rewrite all the history that's occured since the HEAD of origin/master (assuming you've already done a `git fetch`)

  83. Kev

    So you could squash the three patches together, for example, and not have a record of the interim steps.

  84. Kev

    And, indeed, modify the patches while keeping the author etc. intact if you so wish to edit the version numbers but leave the substance intact.

  85. stpeter

    ok, XEP-0277 updated and announced

  86. Vanaryon

    thanks :)

  87. stpeter

    no, thank you!

  88. Vanaryon

    We have added everything we saw from microblogging specs drafts of buddycloud and us :)

  89. Vanaryon

    this may be enough for the moment ;)

  90. Vanaryon

    Thanks a lot for your help stpeter and Kev, and your work ;)

  91. Vanaryon

    Leave, have a good evening (or afternoon in the US? :) )