LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2012, 09:42 AM   #16
sandikaxp
LQ Newbie
 
Registered: Jun 2012
Distribution: Fedora
Posts: 9

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by grail View Post
Well I think it is important to note for people who might search and find this solution that it works incorrectly on the assumption that the longest match for the same path
will end in a file name. An easy example, if we assume that directory blah is as follows:
Code:
branches/upgrade/Build/scripts/compile
branches/upgrade/Build/scripts/compile/blah
branches/upgrade/Build/scripts/compile/build
branches/upgrade/Build/scripts/toolmenu/buildmenu
Your solution will return this as a valid file path when only by manually viewing will we know that it is in fact a directory.
fortunately for me in my scenario, directory path will be created only if there is file associated with that, since we are quarrying for SVN file changes. saying that now I see a bug with this, if someone created a directory only and record that change I will get that as a file, thanks for pointing that. any thoughts how to avoid the same
 
Old 06-21-2012, 04:36 PM   #17
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
There is no programmatical way based on the output. The only solution
would be to do that reporting on the file-system, and generate the report from
there. ...
 
Old 06-21-2012, 06:58 PM   #18
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
Rather than limiting the program to working just within the list of files and directories obtained from the JIRA ticket, I'd go the extra mile to be sure I had it right. I'd compare the list against the SVN repository. That would enable you to differentiate between files and directories. For example, comparing a line ( or a portion of a line ) from the ticket, against the output from something like:

Code:
svn list --depth files ...
which excludes directories. Naturally, the ... would be replaced with the proper args and repository designation, to suit the specifics of the situation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chemistry problem: Identify duplicates and non-duplicates within TWO sdf files robertselwyne Programming 5 12-09-2011 06:20 AM
To remove duplicates from a text file Priyabio Linux - General 5 11-11-2011 02:32 AM
[SOLVED] Duplicates in text file. crowzie Linux - Newbie 10 07-02-2011 10:42 PM
I want to keep the duplicates not remove them! ieatbunnies Linux - Software 1 01-17-2011 12:18 PM
MySQL: How-to Surgically Remove Duplicates mchirico LinuxQuestions.org Member Success Stories 0 06-11-2004 10:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration