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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:49:24+00:00 2026-05-22T16:49:24+00:00

I maintain Merucrial repository for an Android application / Java based sources with package

  • 0

I maintain Merucrial repository for an Android application / Java based sources with package name com.company.app. As with any Android application I had the following directory structure, at directory called origProj

+--assets  
+--res  
+--src  
     +-- com  
       +-- company   
          +-- app

Now I have to change the package name to net.company2.app. The name of the java source files does not change (only the package statement in each file changes). I want to continue using the same repository. I do not want to loose the history/information associated with various commits I have made in the past. How do I do this?

I made a copy of the origProj directory (using Windows file explorer) to newProj– and changed the sub-directories to reflect the new package name –

+--assets  
+--res  
+--src  
   +-- net  
      +-- company2   
         +-- app

It all worked, but when I open the repository to “commit” changes I made, the files listed are messy – I mean there are entries with the older directory structure. It doesn’t surprise me because I realize I did not do it the “Mercurial” way. What is the correct way to do this? I looked into the mercurial Definitive guide – I could not locate the sections relevant to what I am doing- maybe the language/terms are something I could not relate to. Please help.

  • 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-22T16:49:25+00:00Added an answer on May 22, 2026 at 4:49 pm

    You want hg mv of the classes to be refactored, commit, then refactor the classes with the new package name and commit again. purge is not what you want, it removes the files and directories not under version control.

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

Sidebar

Related Questions

I maintain a Java Swing application. For backwards compatibility with java 5 (for Apple
I maintain a ruby based application using the ruby-aws gem which interfaces with Mechanical
I maintain a PHP driven application with Oracle backend (OCI8 functions). The app is
I maintain an Android app and am not using Eclipse. I am not using
I maintain an old PC-only application written in Delphi 7. Although Delphi has served
I maintain an application which, during the course of two years, has constantly required
I maintain the build system at my company, which is currently using CVS. This
I maintain an old application written in VB6. In client's environment it raises runtime
I maintain a legacy ASP.Net Web application (using .Net 2.0 + SQL Server 2005
I maintain an application that sends me an email when an error occurs in

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.