tests/test-simple-update.t
author Angel Ezquerra <angel.ezquerra@gmail.com>
Fri, 06 Sep 2013 00:38:28 +0200
changeset 19811 5e10d41e7b9c
parent 16913 f2719b387380
child 30881 92bca12328d1
permissions -rw-r--r--
merge: let the user choose to merge, keep local or keep remote subrepo revisions When a subrepo has changed on the local and remote revisions, prompt the user whether it wants to merge those subrepo revisions, keep the local revision or keep the remote revision. Up until now mercurial would always perform a merge on a subrepo that had changed on the local and the remote revisions. This is often inconvenient. For example: - You may want to perform the actual subrepo merge after you have merged the parent subrepo files. - Some subrepos may be considered "read only", in the sense that you are not supposed to add new revisions to them. In those cases "merging a subrepo" means choosing which _existing_ revision you want to use on the merged revision. This is often the case for subrepos that contain binary dependencies (such as DLLs, etc). This new prompt makes mercurial better cope with those common scenarios. Notes: - The default behavior (which is the one that is used when ui is not interactive) remains unchanged (i.e. merge is the default action). - This prompt will be shown even if the ui --tool flag is set. - I don't know of a way to test the "keep local" and "keep remote" options (i.e. to force the test to choose those options). # HG changeset patch # User Angel Ezquerra <angel.ezquerra@gmail.com> # Date 1378420708 -7200 # Fri Sep 06 00:38:28 2013 +0200 # Node ID 2fb9cb0c7b26303ac3178b7739975e663075857d # Parent 50d721553198cea51c30f53b76d41dc919280097 merge: let the user choose to merge, keep local or keep remote subrepo revisions When a subrepo has changed on the local and remote revisions, prompt the user whether it wants to merge those subrepo revisions, keep the local revision or keep the remote revision. Up until now mercurial would always perform a merge on a subrepo that had changed on the local and the remote revisions. This is often inconvenient. For example: - You may want to perform the actual subrepo merge after you have merged the parent subrepo files. - Some subrepos may be considered "read only", in the sense that you are not supposed to add new revisions to them. In those cases "merging a subrepo" means choosing which _existing_ revision you want to use on the merged revision. This is often the case for subrepos that contain binary dependencies (such as DLLs, etc). This new prompt makes mercurial better cope with those common scenarios. Notes: - The default behavior (which is the one that is used when ui is not interactive) remains unchanged (i.e. merge is the default action). - This prompt will be shown even if the ui --tool flag is set. - I don't know of a way to test the "keep local" and "keep remote" options (i.e. to force the test to choose those options).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 12365
diff changeset
     1
  $ hg init test
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     2
  $ cd test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     3
  $ echo foo>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     4
  $ hg addremove
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     5
  adding foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     6
  $ hg commit -m "1"
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
     7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     8
  $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
     9
  checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    10
  checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    11
  crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    12
  checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    13
  1 files, 1 changesets, 1 total revisions
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    14
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    15
  $ hg clone . ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    16
  updating to branch default
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    17
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    18
  $ cd ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    19
  $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    20
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    21
  $ echo bar>>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    22
  $ hg commit -m "2"
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
    23
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    24
  $ cd ../test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    25
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    26
  $ hg pull ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    27
  pulling from ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    28
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    29
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    30
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    31
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    32
  added 1 changesets with 1 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    33
  (run 'hg update' to get a working copy)
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
    34
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    35
  $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    36
  checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    37
  checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    38
  crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    39
  checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    40
  1 files, 2 changesets, 2 total revisions
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    41
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    42
  $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    43
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    44
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    45
  $ cat foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    46
  foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    47
  bar
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    48
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    49
  $ hg manifest --debug
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    50
  6f4310b00b9a147241b071a60c28a650827fb03d 644   foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
    51
13960
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    52
update to rev 0 with a date
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    53
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    54
  $ hg upd -d foo 0
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    55
  abort: you can't specify a revision and a date
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
    56
  [255]
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13960
diff changeset
    57
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13960
diff changeset
    58
  $ cd ..