Created
September 24, 2009 20:02
-
-
Save rwilcox/193013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup, ignore me.... | |
cd Temp | |
mkdir hg_commits_from_past_into_branch | |
cd hg_commits_from_past_into_branch | |
hg init | |
bbedit onefile.txt | |
hg status | |
? onefile.txt | |
hg add onefile.txt | |
hg commit -m "first commit" | |
bbedit onefile.txt | |
hg commit -m "a change" | |
bbedit onefile.txt | |
hg commit -m "another change" | |
hg log | |
changeset: 2:7977afae896d | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 1:8f43d44e1446 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 0:abfc1418fed9 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
#################################################################################################### | |
#################################### UNPUBLISHED REPO EXAMPLE ###################################### | |
#################################################################################################### | |
# At this point, with an unpushed repo you can use MQ to pop the changes off | |
# there IS a way you can do this without MQ, but I don't get it... | |
hg qimport -r 1:2 | |
hg qseries | |
hg log | |
changeset: 2:03c5b34ecaf2 | |
branch: my_bad_changes | |
tag: qtip | |
tag: 2.diff | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 1:3fc935cb1ec4 | |
branch: my_bad_changes | |
tag: 1.diff | |
tag: qbase | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 0:abfc1418fed9 | |
tag: qparent | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
hg qpop -a | |
patch queue now empty | |
hg log | |
changeset: 0:abfc1418fed9 | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
hg branch my_bad_changes | |
marked working directory as branch my_bad_changes | |
hg commit -m "added my_bad_changes" | |
hg branch my_bad_changes | |
hg branch | |
my_bad_changes | |
hg qpush -a | |
hg log | |
changeset: 3:2aa50dc6c398 | |
branch: my_bad_changes | |
tag: qtip | |
tag: 2.diff | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 2:b45593daad9e | |
branch: my_bad_changes | |
tag: 1.diff | |
tag: qbase | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 1:95baab78831a | |
branch: my_bad_changes | |
tag: qparent | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:23:20 2009 -0400 | |
summary: added my_bad_changes | |
changeset: 0:abfc1418fed9 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
hg qfinish 2:3 # because we had a commit where we created this branch | |
hg log | |
changeset: 3:2aa50dc6c398 | |
branch: my_bad_changes | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 2:b45593daad9e | |
branch: my_bad_changes | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 1:95baab78831a | |
branch: my_bad_changes | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:23:20 2009 -0400 | |
summary: added my_bad_changes | |
changeset: 0:abfc1418fed9 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
hg update default | |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
hg log | |
changeset: 3:2aa50dc6c398 | |
branch: my_bad_changes | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 2:b45593daad9e | |
branch: my_bad_changes | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 1:95baab78831a | |
branch: my_bad_changes | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:23:20 2009 -0400 | |
summary: added my_bad_changes | |
changeset: 0:abfc1418fed9 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
bbedit onefile.txt | |
#################################################################################################### | |
###################################### PUBLISHED REPO EXAMPLE ###################################### | |
#################################################################################################### | |
# can't put the genie back in the bottle as cleanly here | |
# BUT, in some ways this IS cleaner... more gop in the revision history, but it's clever | |
hg log | |
changeset: 2:7977afae896d | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 1:8f43d44e1446 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 0:abfc1418fed9 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
hg branch my_bad_changes | |
hg commit -m "added branch" | |
hg log | |
changeset: 3:92176df0ae05 | |
branch: my_bad_changes | |
tag: tip | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:35:29 2009 -0400 | |
summary: added branch | |
changeset: 2:7977afae896d | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:05:27 2009 -0400 | |
summary: another change | |
changeset: 1:8f43d44e1446 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:59 2009 -0400 | |
summary: a change | |
changeset: 0:abfc1418fed9 | |
user: Ryan Wilcox <rwilcox@wilcoxd.com> | |
date: Thu Sep 24 15:04:34 2009 -0400 | |
summary: first commit | |
hg update default | |
hg backout --merge 1 | |
hg commit -m "merge commit" | |
hg backout --merge 2 | |
hg commit -m "merge commit 2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment