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 3338578
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:23:34+00:00 2026-05-18T00:23:34+00:00

I need to split a number of files and I’m looking for options to

  • 0

I need to split a number of files and I’m looking for options to retain the full file history in the split-off files.

Background…

I’ve inherited a project containing lots of Oracle PL/SQL packages with the package spec and the package body all stored in a single “.sql” file. I’d prefer to have the package specification and package body in separate files.

i.e.

Starting with: myfile.sql

I’d like to split this file so that the first bit (package specification) goes in:

myfile.pks

and the last bit (package body) goes in:

myfile.pkb

I’ve no issues doing the separation itself, but I was wondering if anyone had any ideas how I could retain show the file history of myfile.sql both in myfile.pks and myfile.pkb.

  • 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-05-18T00:23:35+00:00Added an answer on May 18, 2026 at 12:23 am

    Splitting files can be modelled by hg rename and hg copy to retain the history:

    hg copy  myfile.sql myfile.pks
    hg rename myfile.sql  myfile.pkb
    

    The edit the *.pks and *.pkb file to remove the half that doesn’t belong there.

    After the edit commit it all.

    To see the copies and renames you have to use git format of diffs:

    hg diff -g
    

    Since this is very useful its often set as default in the .hgrcfile by adding:

    [diff]
        git=1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my project i have a folder containing N number of files. I need
I need to split an flv file into chunks of the known size on
I am trying to figure out how to split a file by the number
I have split a large text file into a number of sets of smaller
I need to take an XML file and create multiple output xml files from
I need to split text out of file names which look like this: 'foo_bar_1_10.asc.gz'
I am trying to iterate through a number .rtf files and for each file:
I have a file and suppose I need to split it in up to
I need split string by commas and spaces, but ignore the inside quotes, single
i need to split and print the date value of a record and i

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.