git reflog hg equivalent?

Uwe Brauer oub at mat.ucm.es
Wed Apr 19 20:40:54 UTC 2017


>>> "Nathan" == Nathan Goldbaum <nathan12343 at gmail.com> writes:

   > https://www.mercurial-scm.org/wiki/JournalExtension


Thanks great, but there seems to be a problem. First what worked

hg init
hg bookmark master
echo master1 > test.txt
hg add test.txt
hg commit   -m "master1"
echo master2 > test.txt
hg commit   -m "master2"
echo master3 > test.txt
hg commit   -m "master3"
hg bookmark pretty
echo pretty1 > pretty.txt
hg add pretty.txt
hg commit -m "pretty1"
echo pretty-two >> pretty.txt
hg commit -m "pretty2"
echo pretty-three >> pretty.txt
hg commit -m "Last and best commit"
hg update master
echo default >> test.txt
hg commit -m "back to default"

 hg journal --all

Gives 
previous locations of the working copy and bookmarks:
9f16096a2a4b  .         commit -m 'back to default'
9f16096a2a4b  master    commit -m 'back to default'
ec1953e5fda1  .         update master
83a4f7ff06ca  .         commit -m 'Last and best commit'
83a4f7ff06ca  pretty    commit -m 'Last and best commit'
03504133e762  .         commit -m pretty2
03504133e762  pretty    commit -m pretty2
63d1d8eae039  .         commit -m pretty1
63d1d8eae039  pretty    commit -m pretty1
ec1953e5fda1  pretty    bookmark pretty
ec1953e5fda1  .         commit -m master3
ec1953e5fda1  master    commit -m master3
07ee6540be73  .         commit -m master2
07ee6540be73  master    commit -m master2
844ba7f58323  .         commit -m master1
844ba7f58323  master    commit -m master1

Which is as I expected. It even works with named branches

 hg init
 echo master1 > test.txt
 hg add test.txt
 hg commit   -m "master1"
 echo master2 >> test.txt
 hg commit   -m "master2"
 echo master3 >> test.txt
 hg commit   -m "master3"
 hg branch pretty
 echo pretty1 > pretty.txt
 hg add pretty.txt
 hg commit -m "pretty1"
 echo pretty-two >> pretty.txt
 hg commit -m "pretty2"
 echo pretty-three >> pretty.txt
 hg commit -m "Last and best commit"
 hg update default
 echo default >> test.txt
 hg commit -m "back to default"


Hg journal --all

previous locations of the working copy and bookmarks:
90f01d1652c8  .         commit -m 'back to default'
0cea07cb2ea9  .         update default
fb9639669afb  .         commit -m 'Last and best commit'
d8ea223a5a6f  .         commit -m pretty2
6d21e2ada753  .         commit -m pretty1
0cea07cb2ea9  .         commit -m master3
884d52d15e39  .         commit -m master2
52146ad3c7d2  .         commit -m master1

This does not really makes much sense, but the point is I now run
that command on a repo which is pushed to bitbucket and contains two
named branches. In that repo I obtain

Hg journal --all
previous locations of the working copy and bookmarks:
no recorded locations


Why is this so? The repo has at least 194 commits.

Thanks

Uwe Brauer 




More information about the Mercurial mailing list