bookmarks and branches again: files
Uwe Brauer
oub at mat.ucm.es
Tue Jul 12 15:43:53 UTC 2016
> On Tue, Jul 12, 2016 at 3:07 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
> Is that really true? Deleting a bookmark doesn't change the revision
> that is currently checked out, so I don't see how a file can disappear
> simply because you delete a bookmark.
Well, I run the following
hg init
hg bookmark master
echo one > test1.txt
hg add test1.txt
hg commit -m "0"
hg bookmark book2
hg update book2
echo two >> test2.txt
hg add test2.txt
hg commit -m "1"
echo three >> test1.txt
hg commit -m "2"
hg update master
echo four >> test1.txt
hg commit -m "3"
I obtain
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
created new head
ls -l tells me
drwxr-xr-x 5 oub oub 4.0K 2016-07-12 15:40 .hg
-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:40 test1.txt
hg bookmarks
book2 2:a310e6f2d56e
* master 3:80ae91e1ca84
Hg update book2
ls -l
drwxr-xr-x 5 oub oub 4.0K 2016-07-12 15:40 .hg
-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 10 2016-07-12 15:40 test1.txt
-rw-r--r-- 1 oub oub 4 2016-07-12 15:40 test2.txt
Hg update master
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.
> 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
> 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.
Uwe
More information about the Mercurial
mailing list