changeset 412:40cfa2d0c088

[PATCH]: Typo in localrepository.update -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH]: Typo in localrepository.update From: Goffredo Baroncelli <kreijack@libero.it> I think that there is an error in the method update() of the class localrepository. The variable 'm2n' was used instead of 'man'; so the parent2 flags is computed instead of the ancestor flags. manifest hash: dc11810367615245c4b39660d135ab3c0e71b85d -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCuNWpywK+sNU5EO8RAv9ZAKCxwbd242xZQ1CCrW2WDdQ4gclKtACghXYl 7j1YTRpINItwdXzak3cBS60= =+Tf8 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Tue, 21 Jun 2005 19:06:17 -0800
parents 9e9f7ab43ce2
children a3b5347c22cd
files mercurial/hg.py tests/test-flags tests/test-flags.out
diffstat 3 files changed, 89 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Tue Jun 21 18:54:44 2005 -0800
+++ b/mercurial/hg.py	Tue Jun 21 19:06:17 2005 -0800
@@ -1007,7 +1007,7 @@
         m2 = self.manifest.read(m2n)
         mf2 = self.manifest.readflags(m2n)
         ma = self.manifest.read(man)
-        mfa = self.manifest.readflags(m2n)
+        mfa = self.manifest.readflags(man)
 
         (c, a, d, u) = self.diffdir(self.root)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-flags	Tue Jun 21 19:06:17 2005 -0800
@@ -0,0 +1,35 @@
+#!/bin/sh +ex
+
+mkdir test1
+cd test1
+
+hg init
+touch a b
+hg add a b
+hg ci -t "added a b" -u test -d "0 0"
+
+cd ..
+mkdir test2
+cd test2
+
+hg init
+hg merge ../test1
+hg co
+chmod +x a
+hg ci -t "chmod +x a" -u test -d "0 0"
+
+cd ../test1
+echo 123 >>a
+hg ci -t "a updated" -u test -d "0 0"
+
+ls -l ../test[12]/a
+
+hg merge ../test2
+hg heads
+hg history
+
+hg -dv co -m
+
+ls -l ../test[12]/a > foo
+cut -b 0-10 < foo
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-flags.out	Tue Jun 21 19:06:17 2005 -0800
@@ -0,0 +1,53 @@
+pulling from ../test1
+requesting all changes
+adding changesets
+adding manifests
+adding file revisions
+modified 2 files, added 1 changesets and 2 new revisions
+(run 'hg update' to get a working copy)
+-rw-r--r--  1 oxymoron oxymoron 4 Jun 22 03:04 ../test1/a
+-rwxr-xr-x  1 oxymoron oxymoron 0 Jun 22 03:04 ../test2/a
+pulling from ../test2
+searching for changes
+adding changesets
+adding manifests
+adding file revisions
+modified 1 files, added 1 changesets and 1 new revisions
+(run 'hg update' to get a working copy)
+changeset:   2:3ef54330565526bebf37a0d9bf540c283fd133a1
+tag:         tip
+parent:      0:22a449e20da501ca558394c083ca470e9c81b9f7
+user:        test
+date:        Thu Jan  1 00:00:00 1970
+summary:     chmod +x a
+
+changeset:   1:c6ecefc45368ed556d965f1c1086c6561a8b2ac5
+user:        test
+date:        Thu Jan  1 00:00:00 1970
+summary:     a updated
+
+changeset:   2:3ef54330565526bebf37a0d9bf540c283fd133a1
+tag:         tip
+parent:      0:22a449e20da501ca558394c083ca470e9c81b9f7
+user:        test
+date:        Thu Jan  1 00:00:00 1970
+summary:     chmod +x a
+
+changeset:   1:c6ecefc45368ed556d965f1c1086c6561a8b2ac5
+user:        test
+date:        Thu Jan  1 00:00:00 1970
+summary:     a updated
+
+changeset:   0:22a449e20da501ca558394c083ca470e9c81b9f7
+user:        test
+date:        Thu Jan  1 00:00:00 1970
+summary:     added a b
+
+resolving manifests
+ ancestor f328b97f7c11 local e7f06daf1cdb remote 629f0b785e0e
+ a versions differ, resolve
+merging a
+resolving a
+file a: other 37c42bd6cc03 ancestor b80de5d13875
+-rwxr-xr-x
+-rwxr-xr-x