hg import error checking
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hg import error checking
From: Chris Mason <mason@suse.com>
hg import wasn't checking the return value of patch
and wasn't making sure the list of files collected
was unique.
manifest hash:
85b2a0f0602cfff6ba6a61128a50d79d7fb6e1c7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCuym/ywK+sNU5EO8RAlwSAJ48h8hHi3JMNwrVq0CXIfgMCTGRRQCfSfpP
9kHam+Rt8tra46lCQ4d27G4=
=P00x
-----END PGP SIGNATURE-----
--- a/mercurial/commands.py Thu Jun 23 13:28:47 2005 -0800
+++ b/mercurial/commands.py Thu Jun 23 13:29:35 2005 -0800
@@ -397,8 +397,13 @@
if not quiet:
print l
if l[:14] == 'patching file ':
- files.append(l[14:])
- f.close()
+ pf = l[14:]
+ if pf not in files:
+ files.append(pf)
+ patcherr = f.close()
+ if patcherr:
+ sys.stderr.write("patch failed")
+ sys.exit(1)
if len(files) > 0:
addremove(ui, repo, *files)