bookmarks and branches again: files

Benjamin Fritz fritzophrenic at gmail.com
Tue Jul 12 17:40:26 UTC 2016


On Tue, Jul 12, 2016 at 10:43 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
> hg update master
> 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
>
> Now I delete both bookmarks
>
>   hg bookmark -d book2
>   hg bookmark -d master
>
>
> ls -l
> total 12
> -rw-r--r-- 1 oub oub 351 2016-07-12 15:38 script-bookmark
> -rw-r--r-- 1 oub oub 270 2016-07-12 13:30 script-branch
> -rw-r--r-- 1 oub oub   9 2016-07-12 15:41 test1.txt
>
> So test2.txt is not there.
>
>

Obviously, because you updated to the bookmark that doesn't contain it. Why
did you expect it to be there?

>
>
>    > Not quite sure what you mean by this. "hg status" tells you about the
>    > status of files in your working copy, relative to the revision that
>    > you've got checked out. What would you *like* it to tell you about
>    > test2.txt?
> Hg status does not tell me anything.
> I expected to see
>
> !test2.txt
>
>

Why did you expect this? You updated to a changeset which does not contain
the file, so why should it be present in your working copy?

>    > I don't know what you mean by "dangerous" here - can you explain?
>
> Well test2.txt is not in the directory after having deleted the bookmark.

It may not be in your working copy, but it's still in a head in your
repository graph. You can still update to it by passing an explicit
revision. The file is still there in your repository, and unlike git
nothing will ever be deleted from your history until you explicitly tell
Mercurial to do so using an extension which you must enable beforehand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20160712/81fa42de/attachment-0002.html>


More information about the Mercurial mailing list