without --reverse i get an error, it works with --reverse

CommentFileSizeAuthor
#7 i1494488-7.patch757 bytesattiks
#3 i1494488_0.patch883 bytesjelle_s
#2 i1494488.patch887 bytesattiks
#1 i1494488.patch889 bytesattiks

Comments

attiks’s picture

Status: Active » Needs review
StatusFileSize
new889 bytes

Patch attached

attiks’s picture

StatusFileSize
new887 bytes

white space removed

jelle_s’s picture

StatusFileSize
new883 bytes

I got an error applying the patch:

error: grn.drush.inc.1: No such file or directory

Here's the updated patch:

jcnventura’s picture

Status: Needs review » Needs work

I'm running today's grn-6.x-2.x-dev release with git 1.7.9.5 on Ubuntu 12.04.

I get no errors whatsoever. The only issue here would be two spaces instead of one, so the patch could be simplified by removing the space before the %s for the reverse option and adding it to the beginning of the '--reverse' string.

Anyway, this seems to be a platform-specific problem, or some problem with a specific version of git.

attiks’s picture

This only happens if you apply #1253356: use two most recent tags as defaults

jcnventura’s picture

I applied #1253356: use two most recent tags as defaults, didn't apply this one, and still have no problems.

Since you wrote the patch, you know the only functional difference is whether there's two spaces in the git commnand line between the format and the tags or only one. What kind of system are you using that cares about that?

Also, I'm using the latest Drush release: 7.x-5.2, which may explain better why I don't have the problem.

attiks’s picture

StatusFileSize
new757 bytes

git version 1.7.9
drush 4.5
Ubuntu 10.04

It is the spaces, don't ask why but this works:

  $reverse = drush_get_option('reverse', FALSE) ? ' --reverse' : '';
  if (!drush_shell_exec("%s log -s --pretty=format:%%s%s %s..%s", $git, $reverse, $tag1, $tag2)) {

This doesn't work!

  $reverse = drush_get_option('reverse', FALSE) ? '--reverse ' : '';
  if (!drush_shell_exec("%s log -s --pretty=format:%%s %s%s..%s", $git, $reverse, $tag1, $tag2)) {
attiks’s picture

Status: Needs work » Needs review

BTW I was wrong in #5, it happens with the original version as well

attiks’s picture

Status: Needs review » Needs work

I created a new combined patch in #1253356: use two most recent tags as defaults, seems it is specific to the drush version since the git part works.

jcnventura’s picture

@attiks: is this reverse patch still necessary for you?

My drush grn still works perfectly without it, and it really seems like a hack to solve some unknown problem elsewhere.

My dev server is still on Ubuntu 12.04 (LTS) with git 1.7.9.5, but Drush is now 8.x-6.0-beta1

attiks’s picture

Status: Needs work » Closed (works as designed)