I accidentally clicked "remove" on files with local modifications I
wanted to keep, but did not commit yet. The files with their local
modifications were immediately deleted from my hard disk. Is there any
way to restore them? Quick help appreciated, otherwise I am looking at
some serious loss of code here :(
--
---------------------------------------------------------------------------
M U R K Y
http://groups.google.com/group/murky-app
To unsubscribe: mailto:murky-app+...@googlegroups.com
---------------------------------------------------------------------------
> Quick help appreciated, otherwise I am looking at some serious loss of code here :(
Sorry about the delay in posting; a new member's first post goes into the moderation queue and I'm sometimes lax about checking it (because 90% of the time it's spam.)
For general Mercurial issues like this one, it's best to ask on one of the Mercurial mailing lists at selenic.com. Murky itself doesn't touch your files; it just issues 'hg' commands behind the scenes.
—Jens
I ran into a similar problem the other day. Fortunately I had a backup (thank you, Time Machine). In my case, I had mistakenly assumed I was removing the files from source control, not from the disk. Silly me.
Considering the nature of a source-control system, it'd be a lot nicer if removed files were moved to the Trash rather than deleted.
> I ran into a similar problem the other day. Fortunately I had a backup (thank you, Time Machine). In my case, I had mistakenly assumed I was removing the files from source control, not from the disk. Silly me.
That's the default behavior of "hg rm". According to the help text, the flag "-Af" can be used to schedule deletion from the next revision without touching the files in the working tree, but Murky doesn't send any custom flags.
> Considering the nature of a source-control system, it'd be a lot nicer if removed files were moved to the Trash rather than deleted.
Murky itself doesn't do anything to your files; it just tells Mercurial to. There may be a way to write a Mercurial extension that would do this.
In any case, you can always use "hg revert" to undo the removal (although you'd lose any changes you'd made to the file since the last commit.)
—Jens
thanks for the replies!
On Mar 12, 9:16 am, Jens Alfke <j...@mooseyard.com> wrote:
> On Mar 11, 2010, at 9:47 AM, Jonathan Lundell wrote:
>
> > I ran into a similar problem the other day. Fortunately I had a backup (thank you, Time Machine). In my case, I had mistakenly assumed I was removing the files from source control, not from the disk. Silly me.
>
> That's the default behavior of "hg rm". According to the help text, the flag "-Af" can be used to schedule deletion from the next revision without touching the files in the working tree, but Murky doesn't send any custom flags.
Yes, upon further reading I realized that too. It might be an idea to
offer an option in the alert box confirming the removal to keep the
files.
>
> > Considering the nature of a source-control system, it'd be a lot nicer if removed files were moved to the Trash rather than deleted.
>
> Murky itself doesn't do anything to your files; it just tells Mercurial to. There may be a way to write a Mercurial extension that would do this.
>
> In any case, you can always use "hg revert" to undo the removal (although you'd lose any changes you'd made to the file since the last commit.)
That does not help in my case, since the files were not added to the
repository yet...
> Yes, upon further reading I realized that too. It might be an idea to
> offer an option in the alert box confirming the removal to keep the
> files.
Good idea. Since there’s already an alert popping up, adding a checkbox to it doesn’t increase the overhead for the user.
I’m unlikely to get around to implementing this, but if you file a bug report it’ll be remembered and maybe someone else (you?) will do it.
—Jens