tests/test-merge1.t
author Mads Kiilerich <mads@kiilerich.com>
Fri, 01 Jul 2011 17:37:09 +0200
branchstable
changeset 14825 de9eb6b1da4f
parent 13956 ffb5c09ba822
child 15243 1e9451476bf8
permissions -rw-r--r--
util: rename the util.localpath that uses url to urllocalpath (issue2875) util is never imported by any other name than util, so this is mostly just a simple search and replace from util.localpath to util.urllocalpath (assuming other uses of util.localpath already has been renamed).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     1
  $ cat <<EOF > merge
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     2
  > import sys, os
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     3
  > 
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     4
  > try:
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     5
  >     import msvcrt
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     6
  >     msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     7
  >     msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     8
  > except ImportError:
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
     9
  >     pass
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    10
  > 
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    11
  > print "merging for", os.path.basename(sys.argv[1])
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    12
  > EOF
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    13
  $ HGMERGE="python ../merge"; export HGMERGE
7080
a6477aa893b8 tests: Windows compatibility fixes
Patrick Mezard <pmezard@gmail.com>
parents: 4294
diff changeset
    14
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13439
diff changeset
    15
  $ hg init t
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    16
  $ cd t
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    17
  $ echo This is file a1 > a
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    18
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    19
  $ hg commit -m "commit #0"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    20
  $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    21
  $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    22
  $ hg commit -m "commit #1"
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
    23
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    24
  $ hg update 0
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    25
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    26
  $ echo This is file c1 > c
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    27
  $ hg add c
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    28
  $ hg commit -m "commit #2"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    29
  created new head
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    30
  $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    31
no merges expected
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    32
  $ hg merge -P 1
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    33
  changeset:   1:b8bb4a988f25
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    34
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    35
  date:        Thu Jan 01 00:00:00 1970 +0000
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    36
  summary:     commit #1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    37
  
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    38
  $ hg merge 1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    39
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    40
  (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    41
  $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    42
  diff -r 49035e18a8e6 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    43
  --- /dev/null
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    44
  +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    45
  @@ -0,0 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    46
  +This is file b1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    47
  $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    48
  M b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    49
  $ cd ..; rm -r t
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
    50
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13439
diff changeset
    51
  $ hg init t
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    52
  $ cd t
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    53
  $ echo This is file a1 > a
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    54
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    55
  $ hg commit -m "commit #0"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    56
  $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    57
  $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    58
  $ hg commit -m "commit #1"
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
    59
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    60
  $ hg update 0
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    61
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    62
  $ echo This is file c1 > c
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    63
  $ hg add c
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    64
  $ hg commit -m "commit #2"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    65
  created new head
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    66
  $ echo This is file b2 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    67
merge should fail
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    68
  $ hg merge 1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    69
  abort: untracked file in working directory differs from file in requested revision: 'b'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    70
  [255]
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    71
merge of b expected
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    72
  $ hg merge -f 1
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12664
diff changeset
    73
  merging b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    74
  merging for b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    75
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    76
  (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    77
  $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    78
  diff -r 49035e18a8e6 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    79
  --- /dev/null
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    80
  +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    81
  @@ -0,0 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    82
  +This is file b2
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    83
  $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    84
  M b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    85
  $ cd ..; rm -r t
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
    86
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13439
diff changeset
    87
  $ hg init t
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    88
  $ cd t
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    89
  $ echo This is file a1 > a
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    90
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    91
  $ hg commit -m "commit #0"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    92
  $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    93
  $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    94
  $ hg commit -m "commit #1"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    95
  $ echo This is file b22 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
    96
  $ hg commit -m "commit #2"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    97
  $ hg update 1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    98
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
    99
  $ echo This is file c1 > c
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   100
  $ hg add c
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   101
  $ hg commit -m "commit #3"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   102
  created new head
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   103
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   104
Contents of b should be "this is file b1"
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   105
  $ cat b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   106
  This is file b1
1236
67a28636ea64 Fix bug with co -C across branches, update tests
mpm@selenic.com
parents: 814
diff changeset
   107
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   108
  $ echo This is file b22 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   109
merge fails
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   110
  $ hg merge 2
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   111
  abort: outstanding uncommitted changes (use 'hg status' to list changes)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   112
  [255]
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   113
  $ echo %% merge expected!
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   114
  %% merge expected!
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   115
  $ hg merge -f 2
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   116
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   117
  (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   118
  $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   119
  diff -r 85de557015a8 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   120
  --- a/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   121
  +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   122
  @@ -1,1 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   123
  -This is file b1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   124
  +This is file b22
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   125
  $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   126
  M b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   127
  $ cd ..; rm -r t
407
0e0d0670b2bc [PATCH] Merging identical changes from another branch
mpm@selenic.com
parents:
diff changeset
   128
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13439
diff changeset
   129
  $ hg init t
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   130
  $ cd t
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   131
  $ echo This is file a1 > a
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   132
  $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   133
  $ hg commit -m "commit #0"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   134
  $ echo This is file b1 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   135
  $ hg add b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   136
  $ hg commit -m "commit #1"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   137
  $ echo This is file b22 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   138
  $ hg commit -m "commit #2"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   139
  $ hg update 1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   140
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   141
  $ echo This is file c1 > c
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   142
  $ hg add c
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   143
  $ hg commit -m "commit #3"
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   144
  created new head
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   145
  $ echo This is file b33 > b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   146
merge of b should fail
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   147
  $ hg merge 2
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   148
  abort: outstanding uncommitted changes (use 'hg status' to list changes)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   149
  [255]
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   150
merge of b expected
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   151
  $ hg merge -f 2
13439
d724a69309e0 util: flush stdout before calling external processes
Mads Kiilerich <mads@kiilerich.com>
parents: 12664
diff changeset
   152
  merging b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   153
  merging for b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   154
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   155
  (branch merge, don't forget to commit)
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   156
  $ hg diff --nodates
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11975
diff changeset
   157
  diff -r 85de557015a8 b
11975
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   158
  --- a/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   159
  +++ b/b
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   160
  @@ -1,1 +1,1 @@
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   161
  -This is file b1
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   162
  +This is file b33
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   163
  $ hg status
21884b433c51 tests: unify test-merge1
Pradeepkumar Gayam <in3xes@gmail.com>
parents: 8834
diff changeset
   164
  M b
12664
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   165
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   166
Test for issue2364
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   167
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   168
  $ hg up -qC .
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   169
  $ hg rm b
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   170
  $ hg ci -md
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   171
  $ hg revert -r -2 b
545ec1775021 merge: handle no file parent in backwards merge (issue2364)
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   172
  $ hg up -q -- -2