Re: Using post-review in git's bare repository
Dan, I'm aware of post-review's purpose. Never the less I need something running git-hook. I'm already writing a patch which looks work fine. I hope I finish this - maybe today. Greetings, Jan On Tue, Mar 29, 2011 at 4:50 AM, Dan Savilonis wrote: > Hi Jan, > > The intent of the post-review default behavior is to attempt to > automatically produce a diff of the user's current work. So, it will > look for commits not merged into the tracking branch for the current > branch. For a bare repository, this no longer makes sense. I would > think only the explicit revision range option would make sense in this > context. > > There is no need for a working copy to perform a git on arbitrary > revisions in git. However, if you just type git diff, you'll get an > error because it will try to perform a diff on the working copy (which > doesn't exist). For example: > > Doesn't work: > $ git clone https://github.com/reviewboard/reviewboard.git; cd > reviewboard.git > $ git diff > > Works: > $ git clone https://github.com/reviewboard/reviewboard.git; cd > reviewboard.git > $ git diff HEAD^..HEAD > > Dan > > On Mar 25, 2:20 am, Christian Hammond wrote: >> Really? I'm curious about this because I couldn't even generate a diff in a >> bare repository, and from a google search, it seemed other people were also >> under the impression that you needed an actual checkout. >> >> If it can be made to work, I'm definitely all for including it. That'd be >> much better than needing a full checkout. >> >> Christian >> >> -- >> Christian Hammond - chip...@chipx86.com >> Review Board -http://www.reviewboard.org >> VMware, Inc. -http://www.vmware.com >> >> On Thu, Mar 24, 2011 at 11:08 PM, Jan Koprowski >> wrote: >> >> >> >> >> >> >> >> > Isn't true. >> >> > I already wrote little (3 lines?) patch which allow generate diffs >> > for parent branch from bare-repo but I want to test it in fire of war >> > before I send code to review. Everything looks good so it is possible. >> > Will be good in future if post-review will be tested and modified to >> > work also with bare-repositories. This will allow to use post-review >> > inside git hooks on "central" repo. >> >> > Regards, >> >> > On Thu, Mar 24, 2011 at 9:25 PM, Christian Hammond >> > wrote: >> > > Hi Jan, >> >> > > post-review needs to generate diffs from code in the tree. If it's a bare >> > > tree, there's not really much to generate. It doesn't have the objects >> > for >> > > which to generate those diffs. If you try to run 'git diff', I think >> > you'll >> > > hit the same problems. >> >> > > Christian >> >> > > -- >> > > Christian Hammond - chip...@chipx86.com >> > > Review Board -http://www.reviewboard.org >> > > VMware, Inc. -http://www.vmware.com >> >> > > On Wed, Mar 23, 2011 at 10:05 AM, Jan Koprowski > >> > > wrote: >> >> > >> Hi! >> > >> Because I must figure out how use post-review with git bare >> > repositories >> > >> I start working on it. Running post-review inside bare-repository ands >> > with: >> > >> $post-review -n -d --parent b --serverhttp://localhost:8080/ >> > >> >>> svn info >> > >> >>> git rev-parse --git-dir >> > >> >>> git symbolic-ref -q HEAD >> > >> Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD'] >> > >> fatal: Not a git repository (or any of the parent directories): .git >> > >> But strange thing is I can run git symbolic-ref -q HEAD without error. >> > >> $git symbolic-ref -q HEAD >> > >> refs/heads/master >> > >> Any ideas? >> > >> Regards, >> > >> Jan >> >> > >> -- >> > >> Want to help the Review Board project? Donate today at >> > >>http://www.reviewboard.org/donate/ >> > >> Happy user? Let us know athttp://www.reviewboard.org/users/ >> > >> -~--~~~~--~~--~--~--- >> > >> To unsubscribe from this group, send email to >> > >> reviewboard+unsubscr...@googlegroups.com >> > >> For more options, visit this group at >> > >>http://groups.google.com/group/reviewboard?hl=en >> >> > -- >> > ><> Jan Koprowski > > -- > Want to help the Review Board project? Donate today at > http://www.reviewboard.org/donate/ > Happy user? Let us know at http://www.reviewboard.org/users/ > -~--~~~~--~~--~--~--- > To unsubscribe from this group, send email to > reviewboard+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/reviewboard?hl=en -- ><> Jan Koprowski -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Using post-review in git's bare repository
Hi Jan, The intent of the post-review default behavior is to attempt to automatically produce a diff of the user's current work. So, it will look for commits not merged into the tracking branch for the current branch. For a bare repository, this no longer makes sense. I would think only the explicit revision range option would make sense in this context. There is no need for a working copy to perform a git on arbitrary revisions in git. However, if you just type git diff, you'll get an error because it will try to perform a diff on the working copy (which doesn't exist). For example: Doesn't work: $ git clone https://github.com/reviewboard/reviewboard.git; cd reviewboard.git $ git diff Works: $ git clone https://github.com/reviewboard/reviewboard.git; cd reviewboard.git $ git diff HEAD^..HEAD Dan On Mar 25, 2:20 am, Christian Hammond wrote: > Really? I'm curious about this because I couldn't even generate a diff in a > bare repository, and from a google search, it seemed other people were also > under the impression that you needed an actual checkout. > > If it can be made to work, I'm definitely all for including it. That'd be > much better than needing a full checkout. > > Christian > > -- > Christian Hammond - chip...@chipx86.com > Review Board -http://www.reviewboard.org > VMware, Inc. -http://www.vmware.com > > On Thu, Mar 24, 2011 at 11:08 PM, Jan Koprowski > wrote: > > > > > > > > > Isn't true. > > > I already wrote little (3 lines?) patch which allow generate diffs > > for parent branch from bare-repo but I want to test it in fire of war > > before I send code to review. Everything looks good so it is possible. > > Will be good in future if post-review will be tested and modified to > > work also with bare-repositories. This will allow to use post-review > > inside git hooks on "central" repo. > > > Regards, > > > On Thu, Mar 24, 2011 at 9:25 PM, Christian Hammond > > wrote: > > > Hi Jan, > > > > post-review needs to generate diffs from code in the tree. If it's a bare > > > tree, there's not really much to generate. It doesn't have the objects > > for > > > which to generate those diffs. If you try to run 'git diff', I think > > you'll > > > hit the same problems. > > > > Christian > > > > -- > > > Christian Hammond - chip...@chipx86.com > > > Review Board -http://www.reviewboard.org > > > VMware, Inc. -http://www.vmware.com > > > > On Wed, Mar 23, 2011 at 10:05 AM, Jan Koprowski > > > wrote: > > > >> Hi! > > >> Because I must figure out how use post-review with git bare > > repositories > > >> I start working on it. Running post-review inside bare-repository ands > > with: > > >> $post-review -n -d --parent b --serverhttp://localhost:8080/ > > >> >>> svn info > > >> >>> git rev-parse --git-dir > > >> >>> git symbolic-ref -q HEAD > > >> Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD'] > > >> fatal: Not a git repository (or any of the parent directories): .git > > >> But strange thing is I can run git symbolic-ref -q HEAD without error. > > >> $git symbolic-ref -q HEAD > > >> refs/heads/master > > >> Any ideas? > > >> Regards, > > >> Jan > > > >> -- > > >> Want to help the Review Board project? Donate today at > > >>http://www.reviewboard.org/donate/ > > >> Happy user? Let us know athttp://www.reviewboard.org/users/ > > >> -~--~~~~--~~--~--~--- > > >> To unsubscribe from this group, send email to > > >> reviewboard+unsubscr...@googlegroups.com > > >> For more options, visit this group at > > >>http://groups.google.com/group/reviewboard?hl=en > > > -- > > ><> Jan Koprowski -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Using post-review in git's bare repository
Really? I'm curious about this because I couldn't even generate a diff in a bare repository, and from a google search, it seemed other people were also under the impression that you needed an actual checkout. If it can be made to work, I'm definitely all for including it. That'd be much better than needing a full checkout. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Thu, Mar 24, 2011 at 11:08 PM, Jan Koprowski wrote: > Isn't true. > > I already wrote little (3 lines?) patch which allow generate diffs > for parent branch from bare-repo but I want to test it in fire of war > before I send code to review. Everything looks good so it is possible. > Will be good in future if post-review will be tested and modified to > work also with bare-repositories. This will allow to use post-review > inside git hooks on "central" repo. > > Regards, > > On Thu, Mar 24, 2011 at 9:25 PM, Christian Hammond > wrote: > > Hi Jan, > > > > post-review needs to generate diffs from code in the tree. If it's a bare > > tree, there's not really much to generate. It doesn't have the objects > for > > which to generate those diffs. If you try to run 'git diff', I think > you'll > > hit the same problems. > > > > Christian > > > > -- > > Christian Hammond - chip...@chipx86.com > > Review Board - http://www.reviewboard.org > > VMware, Inc. - http://www.vmware.com > > > > > > On Wed, Mar 23, 2011 at 10:05 AM, Jan Koprowski > > > wrote: > >> > >> Hi! > >> Because I must figure out how use post-review with git bare > repositories > >> I start working on it. Running post-review inside bare-repository ands > with: > >> $post-review -n -d --parent b --server http://localhost:8080/ > >> >>> svn info > >> >>> git rev-parse --git-dir > >> >>> git symbolic-ref -q HEAD > >> Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD'] > >> fatal: Not a git repository (or any of the parent directories): .git > >> But strange thing is I can run git symbolic-ref -q HEAD without error. > >> $git symbolic-ref -q HEAD > >> refs/heads/master > >> Any ideas? > >> Regards, > >> Jan > >> > >> -- > >> Want to help the Review Board project? Donate today at > >> http://www.reviewboard.org/donate/ > >> Happy user? Let us know at http://www.reviewboard.org/users/ > >> -~--~~~~--~~--~--~--- > >> To unsubscribe from this group, send email to > >> reviewboard+unsubscr...@googlegroups.com > >> For more options, visit this group at > >> http://groups.google.com/group/reviewboard?hl=en > > > > > > -- > ><> Jan Koprowski > -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Using post-review in git's bare repository
Isn't true. I already wrote little (3 lines?) patch which allow generate diffs for parent branch from bare-repo but I want to test it in fire of war before I send code to review. Everything looks good so it is possible. Will be good in future if post-review will be tested and modified to work also with bare-repositories. This will allow to use post-review inside git hooks on "central" repo. Regards, On Thu, Mar 24, 2011 at 9:25 PM, Christian Hammond wrote: > Hi Jan, > > post-review needs to generate diffs from code in the tree. If it's a bare > tree, there's not really much to generate. It doesn't have the objects for > which to generate those diffs. If you try to run 'git diff', I think you'll > hit the same problems. > > Christian > > -- > Christian Hammond - chip...@chipx86.com > Review Board - http://www.reviewboard.org > VMware, Inc. - http://www.vmware.com > > > On Wed, Mar 23, 2011 at 10:05 AM, Jan Koprowski > wrote: >> >> Hi! >> Because I must figure out how use post-review with git bare repositories >> I start working on it. Running post-review inside bare-repository ands with: >> $post-review -n -d --parent b --server http://localhost:8080/ >> >>> svn info >> >>> git rev-parse --git-dir >> >>> git symbolic-ref -q HEAD >> Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD'] >> fatal: Not a git repository (or any of the parent directories): .git >> But strange thing is I can run git symbolic-ref -q HEAD without error. >> $git symbolic-ref -q HEAD >> refs/heads/master >> Any ideas? >> Regards, >> Jan >> >> -- >> Want to help the Review Board project? Donate today at >> http://www.reviewboard.org/donate/ >> Happy user? Let us know at http://www.reviewboard.org/users/ >> -~--~~~~--~~--~--~--- >> To unsubscribe from this group, send email to >> reviewboard+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/reviewboard?hl=en > -- ><> Jan Koprowski -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Using post-review in git's bare repository
Hi Jan, post-review needs to generate diffs from code in the tree. If it's a bare tree, there's not really much to generate. It doesn't have the objects for which to generate those diffs. If you try to run 'git diff', I think you'll hit the same problems. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Wed, Mar 23, 2011 at 10:05 AM, Jan Koprowski wrote: > Hi! > > Because I must figure out how use post-review with git bare repositories > I start working on it. Running post-review inside bare-repository ands with: > > $post-review -n -d --parent b --server http://localhost:8080/ > >>> svn info > >>> git rev-parse --git-dir > >>> git symbolic-ref -q HEAD > Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD'] > fatal: Not a git repository (or any of the parent directories): .git > > But strange thing is I can run git symbolic-ref -q HEAD without error. > > $git symbolic-ref -q HEAD > refs/heads/master > > Any ideas? > > Regards, > > Jan > > -- > Want to help the Review Board project? Donate today at > http://www.reviewboard.org/donate/ > Happy user? Let us know at http://www.reviewboard.org/users/ > -~--~~~~--~~--~--~--- > To unsubscribe from this group, send email to > reviewboard+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/reviewboard?hl=en > -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: Using post-review in git's bare repository
Hi! Because I must figure out how use post-review with git bare repositories I start working on it. Running post-review inside bare-repository ands with: $post-review -n -d --parent b --server http://localhost:8080/ >>> svn info >>> git rev-parse --git-dir >>> git symbolic-ref -q HEAD Failed to execute command: ['git', 'symbolic-ref', '-q', 'HEAD'] fatal: Not a git repository (or any of the parent directories): .git But strange thing is I can run git symbolic-ref -q HEAD without error. $git symbolic-ref -q HEAD refs/heads/master Any ideas? Regards, Jan -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en