why does backout in this situation need to merge anything?

Wujek Srujek wujek.srujek at gmail.com
Tue Dec 11 19:57:57 UTC 2012


Hi. Please take a look at the following session:

~/Playground$ hg init test
~/Playground$ cd test
~/Playground/test$ echo -e "A\nB\nC" > file
~/Playground$ cat file
A
B
C
~/Playground/test$ hg ci -Am initial
adding file
~/Playground/test$ echo -e "A\n\n1\n\nB\nC" > file
~/Playground$ cat file
A

1

B
C
~/Playground/test$ hg ci -Am edit_1
~/Playground/test$ echo -e "A\n\n1\n\nB\n\n2\n\nC" > file
~/Playground$ cat file
A

1

B

2

C
~/Playground/test$ hg ci -Am edit_2
~/Playground/test$ >file2
~/Playground/test$ hg ci -Am 'second file'
adding file2
~/Playground/test$ hg backout -r 2
reverting file
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
~/Playground/test$ hg ci -m 'backout 2'
~/Playground/test$ cat file
A

1

B
C
~/Playground/test$ hg diff --change 1
diff --git a/file b/file
--- a/file
+++ b/file
@@ -1,3 +1,6 @@
 A
+
+1
+
 B
 C
~/Playground/test$ hg backout -r 1
reverting file
merging file
1 files updated, 1 files merged, 0 files removed, 0 files unresolved

Basically, it adds 3 changesets, cset 1 and 2 add some lines, and then they
are backouted in reverste order. Why does backing out cset 1 require a
merge?

wujek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20121211/59cc154c/attachment-0002.html>


More information about the Mercurial mailing list