From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 10 Oct 2006 23:09:06 +0400 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20061010190906.GL8008@localhost.localdomain> Mail-Followup-To: devel@lists.altlinux.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Cqq5NadOW2RfLMJ/" Content-Disposition: inline Subject: [devel] git-merge-recursive fails on symlinks X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 19:09:06 -0000 Archived-At: List-Archive: List-Post: --Cqq5NadOW2RfLMJ/ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable /usr/bin/git-merge-recursive: 266 if stat.S_ISREG(mode): 267 try: 268 os.unlink(path) 269 except OSError: 270 pass 271 if mode & 0100: 272 mode =3D 0777 273 else: 274 mode =3D 0666 275 fd =3D os.open(path, os.O_WRONLY | os.O_TRUNC | os.O_CR= EAT, mode) 276 proc =3D subprocess.Popen(prog, stdout=3Dfd) 277 proc.wait() 278 os.close(fd) 279 elif stat.S_ISLNK(mode): 280 linkTarget =3D runProgram(prog) 281 os.symlink(linkTarget, path) 282 else: 283 assert(False) os.symlink =CE=C1 =D3=D4=D2=CF=CB=C5 281 =D5 =CD=C5=CE=D1 =D7=D9=D0=C1=CC= =CF =D3 =CF=DB=C9=C2=CB=CF=CA =D4=C9=D0=C1 path exists. --- /usr/bin/git-merge-recursive- 2006-10-06 12:18:27 +0400 +++ /usr/bin/git-merge-recursive 2006-10-10 23:00:45 +0400 @@ -263,11 +263,11 @@ def updateFileExt(sha, mode, path, updat die("Couldn't create directory", p, e.strerror) =20 prog =3D ['git-cat-file', 'blob', sha] + try: + os.unlink(path) + except OSError: + pass if stat.S_ISREG(mode): - try: - os.unlink(path) - except OSError: - pass if mode & 0100: mode =3D 0777 else: End of patch --Cqq5NadOW2RfLMJ/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFK+/SfBKgtDjnu0YRAgzXAJ9fG/IhwRYHeFpDfI1v56p4EsKm+ACgt7IZ gR1CpA0S8G0MhqnOSdTsVhU= =AeAA -----END PGP SIGNATURE----- --Cqq5NadOW2RfLMJ/--