You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ilan Yaniv <Il...@timetoknow.org> on 2008/12/17 14:17:13 UTC

svnlook cat for xml files

Hi,

I have this xml file:
		Yellow Flower58
		<BBB>ZZZZ</BBB>
		<statefule>false</statefule>
		AAA

Now I want to parse this file.
I use the command svnlook cat <REPOSE_PATH> <FILE_PATH>.

The output of the cat command is:
	Yellow Flower58
<BBB
AAA

This is odd because there is a full line missing, but where?


Ilan Yaniv
Configuration Management
Phone: 03-7534333 ext. 5873
Ilan.Yaniv@timetoknow.org

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985729

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnlook cat for xml files

Posted by Erik Hemdal <er...@comprehensivepower.com>.
-----Original Message-----
From: Ilan Yaniv [mailto:Ilan.Yaniv@timetoknow.org] 
Sent: Wednesday, December 17, 2008 10:46 AM
To: Erik Hemdal; users@subversion.tigris.org
Subject: RE: svnlook cat for xml files



Yes, on command window it looks ok

But from a exe (created from perl) I run the command:

 

my $cat = `$svnlook cat $repos $path`;

            print STDERR "cat before: $cat\n";

 

Maybe it is because I am using back ticks for running the command.

Still I am getting only rows that are not starting with <.

 

If things are OK in a Command Prompt window, then I think Subversion is
doing its job, and the issue lies with your Perl script.  That's kind of off
topic for the SVN list, I think.  

 

You have several layers of complexity here, you've created a binary from
Perl using an external tool, you're taking output directly from a command,
and you're doing it in a hook script.  I would try working on the original
Perl script from the command line, try reading a plain file, not from the
output of svnlook cat, etc. and see what is working and what isn't working.
Once you get a basic script working, add the layers back and see where
things go wrong.

 

Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985842

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnlook cat for xml files

Posted by Erik Hemdal <er...@comprehensivepower.com>.
-----Original Message-----
From: Ilan Yaniv [mailto:Ilan.Yaniv@timetoknow.org] 
Sent: Wednesday, December 17, 2008 10:46 AM
To: Erik Hemdal; users@subversion.tigris.org
Subject: RE: svnlook cat for xml files



Yes, on command window it looks ok

But from a exe (created from perl) I run the command:

 

my $cat = `$svnlook cat $repos $path`;

            print STDERR "cat before: $cat\n";

 

Maybe it is because I am using back ticks for running the command.

Still I am getting only rows that are not starting with <.

 

If things are OK in a Command Prompt window, then I think Subversion is
doing its job, and the issue lies with your Perl script.  That's kind of off
topic for the SVN list, I think.  

 

You have several layers of complexity here, you've created a binary from
Perl using an external tool, you're taking output directly from a command,
and you're doing it in a hook script.  I would try working on the original
Perl script from the command line, try reading a plain file, not from the
output of svnlook cat, etc. and see what is working and what isn't working.
Once you get a basic script working, add the layers back and see where
things go wrong.

 

Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985842

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=988140

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnlook cat for xml files

Posted by Ilan Yaniv <Il...@timetoknow.org>.
Yes, on command window it looks ok

But from a exe (created from perl) I run the command:

 

my $cat = `$svnlook cat $repos $path`;

            print STDERR "cat before: $cat\n";

 

Maybe it is because I am using back ticks for running the command.

Still I am getting only rows that are not starting with <...

 

________________________________

From: Erik Hemdal [mailto:erik@comprehensivepower.com] 
Sent: Wednesday, December 17, 2008 5:30 PM
To: Ilan Yaniv; users@subversion.tigris.org
Subject: RE: svnlook cat for xml files

 

 

	-----Original Message-----
	From: Ilan Yaniv [mailto:Ilan.Yaniv@timetoknow.org] 
	Sent: Wednesday, December 17, 2008 9:17 AM
	To: users@subversion.tigris.org
	Subject: svnlook cat for xml files

	Hi,

	I have this xml file:

	Yellow Flower58

	<BBB>ZZZZ</BBB>

	<statefule>false</statefule>

	AAA

	Now I want to parse this file.

	I use the command svnlook cat <REPOSE_PATH> <FILE_PATH>.

	The output of the cat command is:

	        Yellow Flower58

	<BBB

	AAA

	This is odd because there is a full line missing, but where? 

	 

	I ran a sample test using svnlook cat on a text file in one of
my repositories and found that the entire contents of my file are what I
expected.  I had the file checked out to a working copy and verified
that the results of the svnlook cat match the real contents of the file.


	I would first check to see that your repository is intact and
not corrupted somehow.  Then I would try checking out the file and
verifying that the contents are what you expect, try checking out to a
fresh WC and examining the contents.  

	Assuming that this all checks out, I believe that will identify
if you have a Subversion issue or some other issue.   Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985811

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnlook cat for xml files

Posted by Ilan Yaniv <Il...@timetoknow.org>.
Yes, on command window it looks ok

But from a exe (created from perl) I run the command:

 

my $cat = `$svnlook cat $repos $path`;

            print STDERR "cat before: $cat\n";

 

Maybe it is because I am using back ticks for running the command.

Still I am getting only rows that are not starting with <...

 

________________________________

From: Erik Hemdal [mailto:erik@comprehensivepower.com] 
Sent: Wednesday, December 17, 2008 5:30 PM
To: Ilan Yaniv; users@subversion.tigris.org
Subject: RE: svnlook cat for xml files

 

 

	-----Original Message-----
	From: Ilan Yaniv [mailto:Ilan.Yaniv@timetoknow.org] 
	Sent: Wednesday, December 17, 2008 9:17 AM
	To: users@subversion.tigris.org
	Subject: svnlook cat for xml files

	Hi,

	I have this xml file:

	Yellow Flower58

	<BBB>ZZZZ</BBB>

	<statefule>false</statefule>

	AAA

	Now I want to parse this file.

	I use the command svnlook cat <REPOSE_PATH> <FILE_PATH>.

	The output of the cat command is:

	        Yellow Flower58

	<BBB

	AAA

	This is odd because there is a full line missing, but where? 

	 

	I ran a sample test using svnlook cat on a text file in one of
my repositories and found that the entire contents of my file are what I
expected.  I had the file checked out to a working copy and verified
that the results of the svnlook cat match the real contents of the file.


	I would first check to see that your repository is intact and
not corrupted somehow.  Then I would try checking out the file and
verifying that the contents are what you expect, try checking out to a
fresh WC and examining the contents.  

	Assuming that this all checks out, I believe that will identify
if you have a Subversion issue or some other issue.   Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985811

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=988141

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svnlook cat for xml files

Posted by Erik Hemdal <er...@comprehensivepower.com>.
-----Original Message-----
From: Ilan Yaniv [mailto:Ilan.Yaniv@timetoknow.org] 
Sent: Wednesday, December 17, 2008 9:17 AM
To: users@subversion.tigris.org
Subject: svnlook cat for xml files



Hi,

I have this xml file:

	Yellow Flower58

	<BBB>ZZZZ</BBB>

	<statefule>false</statefule>

	AAA



Now I want to parse this file.

I use the command svnlook cat <REPOSE_PATH> <FILE_PATH>.



The output of the cat command is:

        Yellow Flower58

<BBB

AAA



This is odd because there is a full line missing, but where? 

 

I ran a sample test using svnlook cat on a text file in one of my
repositories and found that the entire contents of my file are what I
expected.  I had the file checked out to a working copy and verified that
the results of the svnlook cat match the real contents of the file.   

I would first check to see that your repository is intact and not corrupted
somehow.  Then I would try checking out the file and verifying that the
contents are what you expect, try checking out to a fresh WC and examining
the contents.  

Assuming that this all checks out, I believe that will identify if you have
a Subversion issue or some other issue.   Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985785

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].