Mercurial HG Update Exited With Status 255
Is it possible that the permissions that file on the server were such that it couldn't be overwitten by the person doing the push?
If, for example, two different people have done that push (and thus update) the second person isn't going to be able to overwrite the files created by the first person's push triggered update.
Maybe try changing the hook to this for a test (you don't actually have those single quotes on your hook, right?):
[hooks]
changegroup = hg --debug update
If it is a permissions issue the usual fix is to put everyone who will be pushing and updating into the same group (I call mine 'hg') and then using the sticky group bit on all the directories in the repo to make sure new files have that group.
bitsoflogic
Updated on June 04, 2022Comments
-
bitsoflogic about 2 years
When remotely updating a Mercurial Repository, I am getting the following error from the
hg update
command that is being run on the remote server after the push. I looked around online for some help for this however was unsuccessful in finding anything useful. At this point, I am hoping for some ideas and / or insight as to what would be causing this problem.The error is just below. It occurred when pushing two changesets. One changeset included an unrelated index.html file change. The other changeset was a merge, which included the index.html change as well as the renaming of the two image files.
levinaris@server01:/home/web/repository$ hg push pushing to ssh://10.10.1.12//home/web/repository searching for changes`remote: adding changesets remote: adding manifests remote: adding file changes remote: added 2 changesets with 1 changes to 1 files remote: abort: Operation not permitted: /home/web/repository/html/images/image.gif remote: warning: changegroup hook exited with status 255
Additional details:
Both images are 10385 bytes in size. (yes, this error occurs on two images I have)
The two images had their names changed in changesets that were already pushed and
hg update
d due to case-folding collisions when attempting to pull the repositories down to Windows PCs.The target server has the following hook in /etc/mercurial/hgrc:
[hooks] changegroup = hg update
As a work-around, I did the following:
- Deleted image.gif.
- Deleted another image file that produced the error.
- Ran
hg update
- success! - Ran
hg revert html/image/image.gif
- Ran
hg revert html/image/otherimage.gif
At this point, I am trying to better understand the cause of this problem, so that I can ensure a solid, easy-to-use implementation in my environment. I really appreciate your help!!
After using
hg --debug update
in the hook, I received this output:levinaris@server01:/home/web/repository$ hg push pushing to /home/web/staging/repository searching for changes adding changesets adding manifests adding file changes added 2 changesets with 1 changes to 1 files resolving manifests overwrite False partial False ancestor 58a5edb95c9a local 58a5edb95c9a+ remote 3aafb97b148c searching for copies back to rev 6 html/index.php: remote is newer -> g html/images/otherimage.gif.casefolding: update permissions -> e html/images/image.gif: update permissions -> e abort: Operation not permitted: /home/web/staging/repository/html/images/image.gif warning: changegroup hook exited with status 255
Additional Permission Information:
All 3 files in the 2 changesets have 775 permission with the webuser:dev user:group.
My Global hgrc file has the webuser trusted
[trusted] users = webuser