Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-imerge @ 5377:756a43a30e34
convert: readd --filemap
To handle merges correctly, this revision adds a filemap_source class
that wraps a converter_source and does the work necessary to calculate
the subgraph we're interested in.
The wrapped converter_source must provide a new getchangedfiles method
that, given a revision rev, and an index N, returns the list of files
that are different in rev and its Nth parent.
The implementation depends on the ability to skip some revisions and to
change the parents field of the commit objects that we returned earlier.
To make the conversion restartable, we assume the revisons in the
revmapfile are topologically sorted.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 04 Oct 2007 23:21:37 -0300 |
parents | 9cd6578750b9 |
children |
rev | line source |
---|---|
5042 | 1 #!/bin/sh |
2 | |
3 echo "[extensions]" >> $HGRCPATH | |
4 echo "imerge=" >> $HGRCPATH | |
5 HGMERGE=true | |
6 export HGMERGE | |
7 | |
8 hg init base | |
9 cd base | |
10 | |
11 echo foo > foo | |
12 echo bar > bar | |
13 hg ci -Am0 -d '0 0' | |
14 | |
5063 | 15 hg mv foo foo2 |
16 echo foo >> foo2 | |
5042 | 17 hg ci -m1 -d '1 0' |
18 | |
19 hg up -C 0 | |
20 echo bar >> foo | |
21 echo bar >> bar | |
22 hg ci -m2 -d '2 0' | |
23 | |
24 echo % start imerge | |
25 hg imerge | |
26 | |
5063 | 27 cat foo2 |
5042 | 28 cat bar |
29 | |
5065
12930b97a729
imerge: gussy up dispatcher to support subcommand opts.
Brendan Cully <brendan@kublai.com>
parents:
5063
diff
changeset
|
30 echo % status -v |
12930b97a729
imerge: gussy up dispatcher to support subcommand opts.
Brendan Cully <brendan@kublai.com>
parents:
5063
diff
changeset
|
31 hg -v imerge st |
5042 | 32 |
5063 | 33 echo % next |
34 hg imerge next | |
35 | |
5042 | 36 echo % merge next |
5063 | 37 hg --traceback imerge |
5042 | 38 |
39 echo % unresolve | |
40 hg imerge unres foo | |
41 | |
42 echo % merge foo | |
43 hg imerge merge foo | |
44 | |
45 echo % save | |
5063 | 46 echo foo > foo2 |
5042 | 47 hg imerge save ../savedmerge |
48 | |
49 echo % load | |
50 hg up -C 0 | |
51 hg imerge --traceback load ../savedmerge | |
5063 | 52 cat foo2 |
5042 | 53 |
54 hg ci -m'merged' -d '3 0' | |
55 hg tip -v | |
56 | |
5224
9cd6578750b9
improve error message for 'hg merge' when repo already at branchtip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5065
diff
changeset
|
57 echo % nothing to merge -- tip |
9cd6578750b9
improve error message for 'hg merge' when repo already at branchtip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5065
diff
changeset
|
58 hg imerge |
9cd6578750b9
improve error message for 'hg merge' when repo already at branchtip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5065
diff
changeset
|
59 |
9cd6578750b9
improve error message for 'hg merge' when repo already at branchtip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5065
diff
changeset
|
60 hg up 0 |
5042 | 61 echo % nothing to merge |
62 hg imerge | |
63 | |
64 exit 0 |