# HG changeset patch # User mpm@selenic.com # Date 1120205452 28800 # Node ID f2442a6a589355e6c29b01882acaa8e439611ee0 # Parent b460a2fd8bb7855348fafb861cd22de1616d331e# Parent 2204311609a08017171372e6be13304222dccaa1 Merge with TAH -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Merge with TAH manifest hash: b8ea5be49794773eeb6b8beb712a7c1bd9ed1e9b -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxPqMywK+sNU5EO8RAn62AJ9nmqCKGck8T4E90V+jljRV56hcHwCff0Co jTfrJT1oJrGRgd6VE/B4hKc= =8nW7 -----END PGP SIGNATURE----- diff -r 2204311609a0 -r f2442a6a5893 doc/hg.1.txt diff -r 2204311609a0 -r f2442a6a5893 mercurial/bdiff.c --- a/mercurial/bdiff.c Fri Jul 01 08:55:10 2005 +0100 +++ b/mercurial/bdiff.c Fri Jul 01 00:10:52 2005 -0800 @@ -13,7 +13,12 @@ #include #include #ifdef _WIN32 +#ifdef _MSC_VER +#define inline __inline +typedef unsigned long uint32_t; +#else #include +#endif static uint32_t htonl(uint32_t x) { return ((x & 0x000000ffUL) << 24) | diff -r 2204311609a0 -r f2442a6a5893 mercurial/commands.py --- a/mercurial/commands.py Fri Jul 01 08:55:10 2005 +0100 +++ b/mercurial/commands.py Fri Jul 01 00:10:52 2005 -0800 @@ -922,6 +922,11 @@ u.warn("broken pipe\n") else: raise + except OSError, inst: + if hasattr(inst, "filename"): + u.warn("abort: %s: %s\n" % (inst.strerror, inst.filename)) + else: + u.warn("abort: %s\n" % inst.strerror) except TypeError, inst: # was this an argument error? tb = traceback.extract_tb(sys.exc_info()[2]) diff -r 2204311609a0 -r f2442a6a5893 mercurial/hg.py --- a/mercurial/hg.py Fri Jul 01 08:55:10 2005 +0100 +++ b/mercurial/hg.py Fri Jul 01 00:10:52 2005 -0800 @@ -711,8 +711,8 @@ # do a full compare of any files that might have changed change = self.changelog.read(self.dirstate.parents()[0]) mf1 = self.manifest.read(change[0]) - for f in lookup: - if fcmp(f, mf): + for f in l: + if fcmp(f, mf1): c.append(f) return (c, a, d, u) diff -r 2204311609a0 -r f2442a6a5893 mercurial/mpatch.c --- a/mercurial/mpatch.c Fri Jul 01 08:55:10 2005 +0100 +++ b/mercurial/mpatch.c Fri Jul 01 00:10:52 2005 -0800 @@ -24,7 +24,12 @@ #include #include #ifdef _WIN32 +#ifdef _MSC_VER +#define inline __inline +typedef unsigned long uint32_t; +#else #include +#endif static uint32_t ntohl(uint32_t x) { return ((x & 0x000000ffUL) << 24) | diff -r 2204311609a0 -r f2442a6a5893 tests/test-clone --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-clone Fri Jul 01 00:10:52 2005 -0800 @@ -0,0 +1,28 @@ +#!/bin/bash + +set -x +mkdir a +cd a +hg init +echo a > a +hg add a +hg commit -t test -u test -d '0 0' + +# Default operation +hg clone . ../b +cd ../b +cat a +hg verify + +# No update +hg clone -U . ../c +cd ../c +cat a +hg verify + +# Default destination +mkdir ../d +cd ../d +hg clone ../a +cd a +hg cat a diff -r 2204311609a0 -r f2442a6a5893 tests/test-clone-failure --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-clone-failure Fri Jul 01 00:10:52 2005 -0800 @@ -0,0 +1,43 @@ +#!/bin/bash + +set -x + +# No local source +hg clone a b +echo $? + +# No remote source +hg clone http://127.0.0.1:3121/a b +echo $? +rm -rf b # work around bug with http clone + +# Inaccessible source +mkdir a +chmod 000 a +hg clone a b +echo $? + +# Inaccessible destination +mkdir b +cd b +hg init +hg clone . ../a +echo $? +cd .. +chmod 700 a +rm -rf a b + +# Source of wrong type +mkfifo a +hg clone a b +echo $? +rm a + +# Default destination, same directory +mkdir q +cd q +hg init +cd .. +hg clone q + +true diff -r 2204311609a0 -r f2442a6a5893 tests/test-clone-failure.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-clone-failure.out Fri Jul 01 00:10:52 2005 -0800 @@ -0,0 +1,44 @@ ++ hg clone a b +abort: No such file or directory: a ++ echo 255 +255 ++ hg clone http://127.0.0.1:3121/a b +requesting all changes +adding changesets +abort: error 111: Connection refused +transaction abort! +rollback completed ++ echo 255 +255 ++ rm -rf b ++ mkdir a ++ chmod 000 a ++ hg clone a b +cp: cannot stat `a/.hg': Permission denied +abort: cp exited with status 1 ++ echo 255 +255 ++ mkdir b ++ cd b ++ hg init ++ hg clone . ../a +abort: destination '../a' already exists ++ echo 1 +1 ++ cd .. ++ chmod 700 a ++ rm -rf a b ++ mkfifo a ++ hg clone a b +cp: cannot stat `a/.hg': Not a directory +abort: cp exited with status 1 ++ echo 255 +255 ++ rm a ++ mkdir q ++ cd q ++ hg init ++ cd .. ++ hg clone q +abort: destination 'q' already exists ++ true diff -r 2204311609a0 -r f2442a6a5893 tests/test-clone.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-clone.out Fri Jul 01 00:10:52 2005 -0800 @@ -0,0 +1,32 @@ ++ mkdir a ++ cd a ++ hg init ++ echo a ++ hg add a ++ hg commit -t test -u test -d '0 0' ++ hg clone . ../b ++ cd ../b ++ cat a +a ++ hg verify +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +1 files, 1 changesets, 1 total revisions ++ hg clone -U . ../c ++ cd ../c ++ cat a +cat: a: No such file or directory ++ hg verify +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +1 files, 1 changesets, 1 total revisions ++ mkdir ../d ++ cd ../d ++ hg clone ../a ++ cd a ++ hg cat a +a