views:

105

answers:

2

Hi guys, it's a quesion about mercurial.

I'm not a unix - guy, but use a mercurial together with MacHG for my development on Mac. Yesterday I had to change my mac, I just copied my project folder with repository on new mac, but now I can't do anything with it in mercurial. I can open project in xcode and everuthing is fine, but if I try to do anything in mercurial via terminal I'm getting this: abort: data/.DS_Store.i@e959df7694ce: no node!

If I try to do anything in MacHG I'm getting Mercurial reported error number 255: skipping unreadable ignore file '/Users/zakhar/.hgignore': No such file or directory abort: data/.DS_Store.i@e959df7694ce: no node!

what can I do? where can I get this .hgignore file? I dont have old mac any more

thanks

A: 

.hgignore file tells Mercurial, what files to ignore.

Just create a .hgignore file at location mentioned and add the following

# use glob syntax.
syntax: glob

*.o
*.so
*.log
*.DS_Store
.DS_Store

See : http://stackoverflow.com/questions/3714820/mercurial-script-plugin-for-ignore-remove-binary-files/3714858#3714858

Also you may want to remove all .DS_Store files in your repo:

find . -name .DS_Store -print0 | xargs -0 hg remove
pyfunc
Ok, thanks, I created ,hgignore file, but still have error `Mercurial reported error number 255:abort: data/.DS_Store.i@e959df7694ce: no match found!` What shall I do with it?
Burjua
@Burjua : Did you add the text above in your .hgignore file
pyfunc
Yes, I've done it, by the way where do I need to put this file ? I put it to my home (/Users/zakhar/), may be somewhere else?
Burjua
That should be fine. You can also try doing: hg add .hgignore at the top level of your repository. or simply place it in the top level of your repo. Let me know, if this works.
pyfunc
Can you add *.DS_Store and .DS_Store to the .hgignore file
pyfunc
+4  A: 

The advice you're getting about putting .DS_Store in your .hgignore file was the advice you needed back when you first setup that repo, however it wont help now. You've already added the .DS_Store files in your repo on your old computer and adding a file overrides .hgignore.

Furthermore, it looks like when you copied the stuff from your old computer to the new computer the .hg/data/.DS_Store.i file and probably anything else with .DS_Store in it didn't copy over.

Drop to terminal on the new computer and do a hg verify. If you get notifications about missing files (and it looks like you will) then you need to re-copy the repository over, or better yet clone it over with hg clone.

Ry4an
Ok, thanks, I didn't know about `hg verify`. Indeed I had these files missing, I copied it via network and apparently something went wrong, thanks God I made a backup copy to usb drive, this copy is ok).
Burjua
Yeah, it was probably your copy tool saying "He probably doesn't want this file it has .DS_Store in the name" not knowing that it was the repository's important history file. Glad it worked out.
Ry4an