Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9147779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:04:35+00:00 2026-06-17T11:04:35+00:00

I’m using cvs (not by choice) and I refactored a project by creating a

  • 0

I’m using cvs (not by choice) and I refactored a project by creating a new package hierarchy in a v2 branch. Now i need to merge the changes that happened in branch v1 into branch v2. But because the files’ path changed i can’t do a normal compare. Is there some way to do this in eclipse (or in any other tool)? i know in general, there’s no way to know for sure if the files have the same origin just by using the filename; this is a non-issue for me since all the filenames are unique in my case. I know I can go and manually select the two files and do a diff but i have too many classes to make this feasible. I am looking for an automatic pairing of the files just like when a file has changed where the tool detects the diff automatically

Does anyone have any other suggestions to do such a merge in a crappy VCS?

Update:
Some explanation of the changes I made might make it clearer

v1
Folder1
   file1
   file2
   file3
   file4
   file5

v2
FolderA
   file1
   FolderA1
      file2
      FolderA11
          file3
   FolderA2
      file4
FolderB
   file5

So, as can be seen, there’s no pattern in the movements. It is just a completely new hierarchy of what was before a flat hierarchy. That means i can’t do a folder diff. What I want is something that pairs v1:folder1/file4 with v2:FolderA/FolderA2/file4 for example so that i can just see the change in content without caring for the fact that the file was moved. In other words, a path-less diff that just uses the filename to match files

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:04:36+00:00Added an answer on June 17, 2026 at 11:04 am

    Try this shell script snippet:

    ls -R /path/to/source1 | grep '.java\|.js\|.css' | grep -v ':$' >allfiles.txt
    ls -R /path/to/source2 | grep '.java\|.js\|.css' | grep -v ':$' >>allfiles.txt
    cat allfiles.txt | sort | uniq -d > same_files.txt
    cat allfiles.txt | sort | uniq -u > different_files.txt
    
    # This will compare the same files one-by-one
    for i in `cat same_files.txt`; do 
        FILE1=`find /path/to/source1 -name $i`; 
        FILE2=`find /path/to/source2 -name $i`;
        diff -q $FILE1 $FILE2 
    done
    

    The trick is the uniq command, and its special switches. -d leaves only the duplicates, -u sorts out the duplicates.

    To run on Windows, use Cygwin: http://www.cygwin.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I am using JSon response to parse title,date content and thumbnail images and place
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
this is what i have right now Drawing an RSS feed into the php,
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.