tests/test-merge-remove
author Mads Kiilerich <mads@kiilerich.com>
Tue, 29 Jun 2010 12:12:34 +0200
branchstable
changeset 11488 f786fc4b8764
parent 6299 653ddd1d7cd7
permissions -rwxr-xr-x
log: follow filenames through renames (issue647) In commands.log a displayer was initialized from cmdutil.show_changeset() with the initial matchfn (which designates the specified files which only is correct in the highest revision in the range). prep() is handed the correct list of files, but displayer.show() didn't use that list but keept using the original matchfn. The matchfn argument to cmdutil.show_changeset() wasn't specified in other places and is only used in .show(), so now we give the matchfn as an optional parameter to .show(). We do however still have to detect --patch and --stat from opts in show_changeset() and let it imply a matchall, but that can now be overruled with the new .show() matchfn parameter.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6297
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     1
#!/bin/sh
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     2
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     3
hg init repo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     4
cd repo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     5
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     6
echo foo > foo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     7
echo bar > bar
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     8
hg ci -qAm 'add foo bar'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     9
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    10
echo foo2 >> foo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    11
echo bleh > bar
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    12
hg ci -m 'change foo bar'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    13
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    14
hg up -qC 0
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    15
hg mv foo foo1
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    16
echo foo1 > foo1
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    17
hg cat foo >> foo1
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    18
hg ci -m 'mv foo foo1'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    19
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    20
hg merge
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    21
hg debugstate --nodates
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    22
hg st -q
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    23
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    24
echo '% removing foo1 and bar'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    25
cp foo1 F
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    26
cp bar B
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    27
hg rm -f foo1 bar
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    28
hg debugstate --nodates
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    29
hg st -qC
6298
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    30
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    31
echo '% readding foo1 and bar'
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    32
cp F foo1
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    33
cp B bar
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    34
hg add -v foo1 bar
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    35
hg debugstate --nodates
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
    36
hg st -qC
6299
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    37
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    38
echo '% reverting foo1 and bar'
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    39
hg revert -vr . foo1 bar
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    40
hg debugstate --nodates
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    41
hg st -qC
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    42
hg diff
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
    43