The short question is: if I hg rollback
, how does Peter get my rolled back version if he cloned from me? What are the exact steps he or me has to do or type?
This is related to http://stackoverflow.com/questions/3034793/in-mercurial-when-peter-hg-clone-me-and-i-commit-and-he-pull-and-update-he-g
The details:
After the following steps, Mary has 7
and Peter has 11
. My repository is 7
What are the exact steps Peter or me has to do or type SO THAT PETER GETS 7 back?
F:\>mkdir hgme
F:\>cd hgme
F:\hgme>hg init
F:\hgme>echo the code is 7 > code.txt
F:\hgme>hg add code.txt
F:\hgme>hg commit -m "this is version 1"
F:\hgme>cd ..
F:\>hg clone hgme hgpeter
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\>cd hgpeter
F:\hgpeter>type code.txt
the code is 7
F:\hgpeter>cd ..
F:\>cd hgme
F:\hgme>notepad code.txt [now i change 7 to 11]
F:\hgme>hg commit -m "this is version 2"
F:\hgme>cd ..
F:\>cd hgpeter
F:\hgpeter>hg pull
pulling from f:\hgme
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
(run 'hg update' to get a working copy)
F:\hgpeter>hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\hgpeter>type code.txt
the code is 11
F:\hgpeter>cd ..
F:\>cd hgme
F:\hgme>hg rollback
rolling back last transaction
F:\hgme>cd ..
F:\>hg clone hgme hgmary
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\>cd hgmary
F:\hgmary>type code.txt
the code is 7
F:\hgmary>cd ..
F:\>cd hgpeter
F:\hgpeter>hg pull
pulling from f:\hgme
searching for changes
no changes found
F:\hgpeter>hg update
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\hgpeter>type code.txt
the code is 11
F:\hgpeter>
What are the exact steps Peter or me has to do or type SO THAT PETER GETS 7 back? There should be some steps that Peter can do to get the "current state" of my repository since he cloned from me. I shouldn't need to knock on his front door to tell him, "hey, you need to rollback" or whatever.