Thread: Re: [Codestriker-user] Perforce and Codestriker
Brought to you by:
sits
|
From: Shambhu S. <sha...@gm...> - 2008-08-28 10:19:40
|
resending (earlier didn't have membership of this list)
On Thu, Aug 28, 2008 at 2:57 PM, Shambhu Sharma <sha...@gm...>wrote:
> Hi,
>
> I found few issue using Codestriker with Perforce.
> 1. While creating a new topic, Codestriker is not able to connect to
> Perforce server.
> After debugging i found that in Perforce.pm, under function "sub
> getDiff":
> Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::p4,
> '-u', $self->{user}, '-P', $self->{password}, 'describe',
> '-du', $tag);
> there is no Perforce server and port parameter supplied.
>
> 2. If i create a topic with a changelist having more than one file, then
> while viewing that topic, it show diff of only first file and for rest of
> files it show empty. And if i click on "parallel view" for rest of files
> (not the first file in changelist), it just shows parallel files without any
> diff color code... but actually there is difference between two version of
> files.
>
> 3. In user manual, i read that for a file's text view for each segment of
> diff, corresponding line no. is highlighted and user can enter comment for
> that particular diff. But in my case the line no. is not highlighted. And i
> am able to add comment only using "Add file comment".
>
> Am i missing something in while configuring Codestriker?
>
> --
> If linux doesn't have a solution, then u have a wrong problem.
>
> Shambhu Kumar Sharma
> Arada Systems
> 91-98864 91913
>
--
If linux doesn't have a solution, then u have a wrong problem.
Shambhu Kumar Sharma
Arada Systems
91-98864 91913
|
|
From: David S. <dav...@gm...> - 2008-08-29 06:23:40
|
Hi Shambhu,
I can see why Codestriker has not accepted it, the diff from Perforce
is invalid (or the last line got chopped):
==== //depot/MAIN/SRC/hello.h#4 (text) ====
@@ -1,4 +1,7 @@
#header file
include <stdio.h>
+include <conio.h>
include <hello.c>
-hello world+include header.h
+hello world
+bye world
The diff says there are 4 "old" lines, and 7 "new" ones. If you count
the number of lines that don't start with a "+" or "-" character,
these lines appear for both the old and new versions of the file.
There are three of those lines.
The lines starting with "-" belong to the old version. There is 1 of
these, so 1+3 == 4, which is correct.
However there are only 3 lines starting with "+", so 3+3 == 6 which is
!= 7, as reported in the diff header. It appears there is one line
missing from the diff. Can you confirm this?
It could be that this is a bug from Perforce - perhaps it has chopped
the last line if it is just a newline character. Can you confirm?
Cheers,
David
On Fri, Aug 29, 2008 at 3:00 PM, Shambhu Sharma <sha...@gm...> wrote:
> Hi David,
>
> Thanks for reply. #3 is working fine and i fixed #1 in my
> code. I have attached screenshot and topic text for #2. Please have a look.
>
>
> Regards,
> Shambhu.
>
> On Fri, Aug 29, 2008 at 4:44 AM, David Sitsky <dav...@gm...>
> wrote:
>>
>> >> 1. While creating a new topic, Codestriker is not able to connect to
>> >> Perforce server.
>> >> After debugging i found that in Perforce.pm, under function "sub
>> >> getDiff":
>> >> Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::p4,
>> >> '-u', $self->{user}, '-P', $self->{password},
>> >> 'describe',
>> >> '-du', $tag);
>> >> there is no Perforce server and port parameter supplied.
>>
>> Yes - this has been fixed already in CVS. The current code only works
>> if Perforce is running on the same machine as Codestriker. Check out
>>
>> http://codestriker.cvs.sourceforge.net/codestriker/codestriker/lib/Codestriker/Repository/Perforce.pm?revision=1.7&view=markup
>> at the bottom to see how it should be - its a very simple change.
>> This will be in the upcoming 1.9.7 release.
>>
>> >> 2. If i create a topic with a changelist having more than one file,
>> >> then
>> >> while viewing that topic, it show diff of only first file and for rest
>> >> of
>> >> files it show empty. And if i click on "parallel view" for rest of
>> >> files
>> >> (not the first file in changelist), it just shows parallel files
>> >> without any
>> >> diff color code... but actually there is difference between two version
>> >> of
>> >> files.
>>
>> Can you send me the topic text of an example review showing this
>> problem? Click on "Download topic text" and send me the resulting
>> .txt file. Perhaps Codestriker isn't parsing the Perforce diff
>> correctly, but I can't be sure until I see it. Could you also email
>> me a screenshot?
>>
>> >> 3. In user manual, i read that for a file's text view for each segment
>> >> of
>> >> diff, corresponding line no. is highlighted and user can enter comment
>> >> for
>> >> that particular diff. But in my case the line no. is not highlighted.
>> >> And i
>> >> am able to add comment only using "Add file comment".
>>
>> You should be able to go over the line number and click it to bring up
>> a comment popup box. What happens when you click on a line number?
>> If nothing is happening, perhaps there is a config issue - check your
>> apache error log for some more clues.
>>
>> Cheers,
>> David
>
>
>
> --
> If linux doesn't have a solution, then u have a wrong problem.
>
> Shambhu Kumar Sharma
> Arada Systems
> 91-98864 91913
>
|
|
From: Shambhu S. <sha...@gm...> - 2008-08-29 06:50:15
|
Hi David,
Perforce diff is correct. In 7 new lines:
3 unchanged,
3 addition (+include <conio.h>, +hello world, +bye world)
and 1 replace (-hello world+include header.h)
Adding to above topic, when i clicked on "parallel" to view the second file,
its showing the new file code in both the pane (left & right). I think this
is why, its showing no difference in the main page.
I have one more question. If a Changelist has more than one file, can i do
review of a specific file without uploading the diff text. i.e. i tried to
enter the changelist no. in "start tag" and full path of that file in
"module" section, but that didn't work. It displayed the diff of all files
instead of specific file name which mentioned into "module".
Regards,
Shambhu.
On Fri, Aug 29, 2008 at 11:53 AM, David Sitsky <dav...@gm...>wrote:
> Hi Shambhu,
>
> I can see why Codestriker has not accepted it, the diff from Perforce
> is invalid (or the last line got chopped):
>
> ==== //depot/MAIN/SRC/hello.h#4 (text) ====
>
> @@ -1,4 +1,7 @@
> #header file
> include <stdio.h>
> +include <conio.h>
> include <hello.c>
> -hello world+include header.h
> +hello world
> +bye world
>
> The diff says there are 4 "old" lines, and 7 "new" ones. If you count
> the number of lines that don't start with a "+" or "-" character,
> these lines appear for both the old and new versions of the file.
> There are three of those lines.
>
> The lines starting with "-" belong to the old version. There is 1 of
> these, so 1+3 == 4, which is correct.
>
> However there are only 3 lines starting with "+", so 3+3 == 6 which is
> != 7, as reported in the diff header. It appears there is one line
> missing from the diff. Can you confirm this?
>
> It could be that this is a bug from Perforce - perhaps it has chopped
> the last line if it is just a newline character. Can you confirm?
>
> Cheers,
> David
>
> On Fri, Aug 29, 2008 at 3:00 PM, Shambhu Sharma <sha...@gm...>
> wrote:
> > Hi David,
> >
> > Thanks for reply. #3 is working fine and i fixed #1 in my
> > code. I have attached screenshot and topic text for #2. Please have a
> look.
> >
> >
> > Regards,
> > Shambhu.
> >
> > On Fri, Aug 29, 2008 at 4:44 AM, David Sitsky <dav...@gm...>
> > wrote:
> >>
> >> >> 1. While creating a new topic, Codestriker is not able to connect to
> >> >> Perforce server.
> >> >> After debugging i found that in Perforce.pm, under function "sub
> >> >> getDiff":
> >> >> Codestriker::execute_command($stdout_fh, $stderr_fh,
> $Codestriker::p4,
> >> >> '-u', $self->{user}, '-P', $self->{password},
> >> >> 'describe',
> >> >> '-du', $tag);
> >> >> there is no Perforce server and port parameter supplied.
> >>
> >> Yes - this has been fixed already in CVS. The current code only works
> >> if Perforce is running on the same machine as Codestriker. Check out
> >>
> >>
> http://codestriker.cvs.sourceforge.net/codestriker/codestriker/lib/Codestriker/Repository/Perforce.pm?revision=1.7&view=markup
> >> at the bottom to see how it should be - its a very simple change.
> >> This will be in the upcoming 1.9.7 release.
> >>
> >> >> 2. If i create a topic with a changelist having more than one file,
> >> >> then
> >> >> while viewing that topic, it show diff of only first file and for
> rest
> >> >> of
> >> >> files it show empty. And if i click on "parallel view" for rest of
> >> >> files
> >> >> (not the first file in changelist), it just shows parallel files
> >> >> without any
> >> >> diff color code... but actually there is difference between two
> version
> >> >> of
> >> >> files.
> >>
> >> Can you send me the topic text of an example review showing this
> >> problem? Click on "Download topic text" and send me the resulting
> >> .txt file. Perhaps Codestriker isn't parsing the Perforce diff
> >> correctly, but I can't be sure until I see it. Could you also email
> >> me a screenshot?
> >>
> >> >> 3. In user manual, i read that for a file's text view for each
> segment
> >> >> of
> >> >> diff, corresponding line no. is highlighted and user can enter
> comment
> >> >> for
> >> >> that particular diff. But in my case the line no. is not highlighted.
> >> >> And i
> >> >> am able to add comment only using "Add file comment".
> >>
> >> You should be able to go over the line number and click it to bring up
> >> a comment popup box. What happens when you click on a line number?
> >> If nothing is happening, perhaps there is a config issue - check your
> >> apache error log for some more clues.
> >>
> >> Cheers,
> >> David
> >
> >
> >
> > --
> > If linux doesn't have a solution, then u have a wrong problem.
> >
> > Shambhu Kumar Sharma
> > Arada Systems
> > 91-98864 91913
> >
>
--
If linux doesn't have a solution, then u have a wrong problem.
Shambhu Kumar Sharma
Arada Systems
91-98864 91913
|
|
From: David S. <dav...@gm...> - 2008-08-29 07:20:28
|
Hi Shambhu, > Hi David, > Perforce diff is correct. In 7 new lines: > 3 unchanged, > 3 addition (+include <conio.h>, +hello world, +bye world) > and 1 replace (-hello world+include header.h) But that line is not in valid diff syntax. Instead of: -hello world+include header.h it should be: -hello world +include header.h So I think Perforce has produced an incorrect diff. > I have one more question. If a Changelist has more than one file, can i do > review of a specific file without uploading the diff text. i.e. i tried to > enter the changelist no. in "start tag" and full path of that file in > "module" section, but that didn't work. It displayed the diff of all files > instead of specific file name which mentioned into "module". I think with Perforce, the way getDiff() currently works, it simply retrieves all files associated with the changelist. In theory, we could update it so that if one of the tags is specified, we could use that as a filter against the file entries retrieved, which might be nicer. Cheers, David |
|
From: David S. <dav...@gm...> - 2008-09-01 07:27:04
|
Great - good to hear. On Mon, Sep 1, 2008 at 3:06 PM, Shambhu Sharma <sha...@gm...> wrote: > Hi David, > > I applied the patch you sent, and its working fine now. > Thanks a lot. > > > Regards, > Shambhu. > > On Fri, Aug 29, 2008 at 5:22 PM, David Sitsky <dav...@gm...> > wrote: >> >> Hi Shambhu, >> >> There does seem to be a problem. I have added a unit test for your >> diff, and now it seems ok. Try applying my diff attached to this >> email and let me know if all is well - thanks. >> >> Cheers, >> David >> >> On Fri, Aug 29, 2008 at 5:36 PM, Shambhu Sharma <sha...@gm...> >> wrote: >> > Hi David, >> > >> > I realized the same diff issue with Perforce, >> > later. >> > But even if the diff is correct, its not showing for rest of files. I >> > have >> > attached the screen shot and topic text file. Topic text downloaded from >> > codestriker has correct diff format for all the files, but still its >> > showing >> > diff for only first file. >> > >> > Regards, >> > Shambhu. >> > >> > On Fri, Aug 29, 2008 at 12:50 PM, David Sitsky <dav...@gm...> >> > wrote: >> >> >> >> Hi Shambhu, >> >> >> >> > Hi David, >> >> > Perforce diff is correct. In 7 new lines: >> >> > 3 unchanged, >> >> > 3 addition (+include <conio.h>, +hello world, +bye world) >> >> > and 1 replace (-hello world+include header.h) >> >> >> >> But that line is not in valid diff syntax. Instead of: >> >> >> >> -hello world+include header.h >> >> >> >> it should be: >> >> >> >> -hello world >> >> +include header.h >> >> >> >> So I think Perforce has produced an incorrect diff. >> >> >> >> > I have one more question. If a Changelist has more than one file, can >> >> > i >> >> > do >> >> > review of a specific file without uploading the diff text. i.e. i >> >> > tried >> >> > to >> >> > enter the changelist no. in "start tag" and full path of that file in >> >> > "module" section, but that didn't work. It displayed the diff of all >> >> > files >> >> > instead of specific file name which mentioned into "module". >> >> >> >> I think with Perforce, the way getDiff() currently works, it simply >> >> retrieves all files associated with the changelist. In theory, we >> >> could update it so that if one of the tags is specified, we could use >> >> that as a filter against the file entries retrieved, which might be >> >> nicer. >> >> >> >> Cheers, >> >> David >> > >> > >> > >> > -- >> > If linux doesn't have a solution, then u have a wrong problem. >> > >> > Shambhu Kumar Sharma >> > Arada Systems >> > 91-98864 91913 >> > > > > > -- > If linux doesn't have a solution, then u have a wrong problem. > > Shambhu Kumar Sharma > Arada Systems > 91-98864 91913 > |
|
From: David S. <dav...@gm...> - 2008-08-28 23:14:03
|
>> 1. While creating a new topic, Codestriker is not able to connect to
>> Perforce server.
>> After debugging i found that in Perforce.pm, under function "sub
>> getDiff":
>> Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::p4,
>> '-u', $self->{user}, '-P', $self->{password}, 'describe',
>> '-du', $tag);
>> there is no Perforce server and port parameter supplied.
Yes - this has been fixed already in CVS. The current code only works
if Perforce is running on the same machine as Codestriker. Check out
http://codestriker.cvs.sourceforge.net/codestriker/codestriker/lib/Codestriker/Repository/Perforce.pm?revision=1.7&view=markup
at the bottom to see how it should be - its a very simple change.
This will be in the upcoming 1.9.7 release.
>> 2. If i create a topic with a changelist having more than one file, then
>> while viewing that topic, it show diff of only first file and for rest of
>> files it show empty. And if i click on "parallel view" for rest of files
>> (not the first file in changelist), it just shows parallel files without any
>> diff color code... but actually there is difference between two version of
>> files.
Can you send me the topic text of an example review showing this
problem? Click on "Download topic text" and send me the resulting
.txt file. Perhaps Codestriker isn't parsing the Perforce diff
correctly, but I can't be sure until I see it. Could you also email
me a screenshot?
>> 3. In user manual, i read that for a file's text view for each segment of
>> diff, corresponding line no. is highlighted and user can enter comment for
>> that particular diff. But in my case the line no. is not highlighted. And i
>> am able to add comment only using "Add file comment".
You should be able to go over the line number and click it to bring up
a comment popup box. What happens when you click on a line number?
If nothing is happening, perhaps there is a config issue - check your
apache error log for some more clues.
Cheers,
David
|