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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:23:51+00:00 2026-05-15T04:23:51+00:00

I had 2 Python similar scripts, that I’ve since merged into one (and now

  • 0

I had 2 Python similar scripts, that I’ve since merged into one (and now takes some parameters to differ the behaviour appropriately). Both of the previous files are in the tip of my Mercurial repository. How can I indicate that the new file, is a combination of the 2 older files that I intend to remove?

Also note, that 1 file has been chosen in favor of the other, and some code moved across, so if it’s not possible to create a version controlled file with a new name, then assimilating one file’s history into the other will suffice.

  • 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-15T04:23:52+00:00Added an answer on May 15, 2026 at 4:23 am

    It’s not a perfect solution, and it might be too late to do it this time, but I think hg rename would get you where you want to go. Here’s a sequence:

    ry4an@hail [~/hg] % mkdir test
    ry4an@hail [~/hg] % cd test/
    ry4an@hail [~/hg/test] % hg init
    ry4an@hail [~/hg/test] % echo stuff > file1
    ry4an@hail [~/hg/test] % echo different > file2
    ry4an@hail [~/hg/test] % hg commit --addremove -m 'adding both separately'
    adding file1
    adding file2
    ry4an@hail [~/hg/test] % hg rename --force file1 file2
    ry4an@hail [~/hg/test] % hg commit -m 'overwrote 2 with 1'
    ry4an@hail [~/hg/test] % hg grep --follow different file2
    file2:0:different
    ry4an@hail [~/hg/test] % hg grep --follow stuff file2 
    file2:1:stuff
    

    Notice that the file ‘grep’ find that ‘stuff’ was in file2 revision 1 and ‘different’ was in file two revision 0, so both histories are now in file2.

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

Sidebar

Related Questions

I had written a program in Python 3, but now want to convert it
I'm reading Dive into Python, especially trying to understand the examples, and I had
I've used Python's miniDom library before. It had a useful method that I'm missing
I was wondering if python had a built in function similar to string->list and
I'd like to use python to build an app that is similar to zeroMQ
I had a question about boost python. I've been working on exporting some functionality
So I had a similar question that was answered in another thread. How do
I asked a similar question yesterday but I included some code that basically took
In Python 2, file objects had an xreadlines() method which returned an iterator that
Is there a reasonable way in Python to implement mixin behavior similar to that

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.