Commit Graph

8 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
91aeb4643e test-merge6: avoid a shell script 2007-03-27 01:41:18 -03:00
Matt Mackall
2085d36412 make manifest friendlier
switch to using context code
..which uses first parent by default
show file hashes only with debug switch
show permissions with verbose
fix up tests
2006-11-30 22:38:48 -06:00
Vadim Gelfer
e5df462a15 deprecate 'update -m'. use 'merge' instead. 2006-05-14 21:07:34 -07:00
Thomas Arendsen Hein
1b244c77c7 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Some systems show "Thu Jan 01" instead of "Thu Jan  1", which breaks tests.
Using "1000000" yields "Mon Jan 12 13:46:40 1970", which looks the same on
all systems.
2006-03-13 13:05:41 +01:00
Thomas Arendsen Hein
f9e80dc2e8 Don't use 'set -x', fix exports, sed and hexdump usage for Solaris. 2005-07-29 15:19:43 +01:00
mpm@selenic.com
3a08ca5eaa Update tests to use commit -m and default -u
manifest hash: 6e4385453843031a712005a320d6000595b40d05
2005-07-21 15:05:17 -05:00
Matt Mackall
045928efda update tests
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

update tests

manifest hash: 70079385599132ca8f90582e1f9317ca46167532
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCyaISywK+sNU5EO8RApnGAJ0blIxE0tKPzcRQUDAHCLe5KmUSNgCgjGoA
kV4Os9FG1NmGaCysPIsKwts=
=Ee67
-----END PGP SIGNATURE-----
2005-07-04 12:54:42 -08:00
maf46@burn.cl.cam.ac.uk
7b2a775c50 Fix zombie files in merge
# HG changeset patch
# User maf46@burn.cl.cam.ac.uk
# Node ID 57667c9b93a5a743e4629d15a0e6bd76699130c3
# Parent  4309b0a5a6010dd2e5811b77d2bc29a51acf290f

Fix zombie files in merge

Keir Fraser observed the following:

> I made a small test case that illustrates the bug in merging changesets
> with 'hg remove's in them:
>
> 1. Create a repository A containing files foo & bar.
> 2. Create clone called B.
> 3. A removes file bar, and commits this removal.
> 4. B edits file foo, and commits this edit.
>
> Now, if B:
>   # hg pull ../A; hg update -m; hg commit
> Then bar remains deleted.
>
> If A:
>   # hg pull ../B; hg update -m; hg commit
> Then bar is resurrected!
>
> It looks as though, when you merge across a branch, any deletions in
> your own branch are forgotten.
> ...
> Fixing this is a must, as zombie files are a real pain. :-)

Keir later patched our local copy of hg as shown below, which fixes
the problem.  I've also enclosed a test which captures the test Keir
outlined...

Files deleted on a branch should not automatically reappear in a merge

Patch notes:
 1. The first chunk does not change behaviour, but cleans up the code
    to more closely match check of 'force' in the second chunk. I
    think it makes the code clearer.
 2. The second chunk fixes two bugs --
    i.  If we choose to keep a remotely-changed locally-deleted file,
        then we need to 'get' that file. If we choose to delete it
        then no action need be taken (it is already deleted in the
        working manifest). Without this fix, choosing to delete would
        get a Python traceback.
    ii. The test for whether the file was remotely-created is
        insufficient. It is only true if f is not in the common
        ancestor. Otherwise the file was deleted locally, and should
        remain deleted. (this is the most important fix!)


Index: hg/tests/test-merge6
===================================================================
2005-07-04 12:38:34 -08:00