Mercurial > hg
comparison mercurial/commands.py @ 443:470a83212dda
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-----
author | mpm@selenic.com |
---|---|
date | Thu, 23 Jun 2005 13:29:35 -0800 |
parents | 5b38a5af4019 |
children | a1e91c24dab5 |
comparison
equal
deleted
inserted
replaced
442:3e2aee6c5500 | 443:470a83212dda |
---|---|
395 for l in f.read().splitlines(): | 395 for l in f.read().splitlines(): |
396 l.rstrip('\r\n'); | 396 l.rstrip('\r\n'); |
397 if not quiet: | 397 if not quiet: |
398 print l | 398 print l |
399 if l[:14] == 'patching file ': | 399 if l[:14] == 'patching file ': |
400 files.append(l[14:]) | 400 pf = l[14:] |
401 f.close() | 401 if pf not in files: |
402 files.append(pf) | |
403 patcherr = f.close() | |
404 if patcherr: | |
405 sys.stderr.write("patch failed") | |
406 sys.exit(1) | |
402 | 407 |
403 if len(files) > 0: | 408 if len(files) > 0: |
404 addremove(ui, repo, *files) | 409 addremove(ui, repo, *files) |
405 repo.commit(files, text) | 410 repo.commit(files, text) |
406 | 411 |