# HG changeset patch # User mpm@selenic.com # Date 2005-06-22 03:06:17 # Node ID 40cfa2d0c088b236ece1e6bab0666ed7210fb0da # Parent 9e9f7ab43ce2a5dbd361e401d300a188669a5f55 [PATCH]: Typo in localrepository.update -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH]: Typo in localrepository.update From: Goffredo Baroncelli 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----- diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -1007,7 +1007,7 @@ class localrepository: 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) diff --git a/tests/test-flags b/tests/test-flags new file mode 100755 --- /dev/null +++ b/tests/test-flags @@ -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 + diff --git a/tests/test-flags.out b/tests/test-flags.out new file mode 100644 --- /dev/null +++ b/tests/test-flags.out @@ -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