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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:15:02+00:00 2026-05-28T08:15:02+00:00

I’ve created a repository in the project’s directory. I’ve added all the files and

  • 0

I’ve created a repository in the project’s directory. I’ve added all the files and made some commits. Then I added new files to project and to repository. After that I returned to earlier version and now I can’t update to last version. After hg update tip I’m getting this message:

abort: untracked file in working directory differs from file in requested
revision: '.DS_Store'

I’m new to mercurial. How can I fix this?

  • 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-28T08:15:03+00:00Added an answer on May 28, 2026 at 8:15 am

    It means that Mercurial is unsure about what to do. You have a file with content something in the working copy. The file is not version controlled, so Mercurial will normally leave it alone when you update. However, the revision you’re updating to also has a file with the same name, and the content differs from the something you already have in the file.

    You can get this problem if you do

    $ hg init
    $ echo "a file" > a
    $ hg add a
    $ hg commit -m "added a"
    $ echo "b file" > b
    $ hg add b
    $ hg commit -m "added b"
    

    You now have two revisions, the latest has files a and b. If you update back to the first revision and create a different file b, then you get trouble:

    $ hg update 0
    $ echo "other b file" > b
    $ hg update
    abort: untracked file in working directory differs from file in requested
    revision: 'b'
    

    The normal solution is to commit before updating. You should generally not update with a dirty working copy (“dirty” means that hg status isn’t empty). Mercurial does support such updates, but you should only use them if you know what you’re doing.

    So to continue the example above we can either commit the new b and then merge:

    $ hg add b
    $ hg commit -m "added new b"
    $ hg merge
    

    This gives a conflict in b since the two versions contain b file and other b file, respectively. Resolve the conflict and commit:

    $ hg commit -m "merged two bs"
    

    An alternative is to delete the file from the working copy. That is what I’ll do in your case: .DS_Store files should not be tracked in the first place. They store some folder information on Mac OS X and this is not part of your source code. So you do

    $ rm .DS_Store
    $ hg update
    

    The update resurrected the .DS_Store file. You now want to tell Mercurial that it should stop tracking the file:

    $ hg forget .DS_Store
    

    and you also want to tell Mercurial to ignore such files from now on:

    $ echo "syntax: glob" >> .hgignore
    $ echo ".DS_Store" >> .hgignore
    $ hg commit -m "removed .DS_Store file, ignored from now on"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I am doing a simple coin flipping experiment for class that involves flipping a

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.