changeset 5360:b98c377b3c16

Merge with crew.
author Bryan O'Sullivan <bos@serpentine.com>
date Tue, 02 Oct 2007 13:49:36 -0700
parents efe7ef325737 (diff) 6b6104430964 (current diff)
children adce4d30a6ea 9bdce4a7964c
files hgext/convert/hg.py mercurial/util.py
diffstat 6 files changed, 50 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/hg.py	Tue Oct 02 13:49:11 2007 -0700
+++ b/hgext/convert/hg.py	Tue Oct 02 13:49:36 2007 -0700
@@ -61,7 +61,7 @@
         try:
             util.unlink(self.repo.wjoin(f))
             #self.repo.remove([f])
-        except:
+        except OSError:
             pass
 
     def setbranch(self, branch, pbranch, parents):
--- a/mercurial/util.py	Tue Oct 02 13:49:11 2007 -0700
+++ b/mercurial/util.py	Tue Oct 02 13:49:36 2007 -0700
@@ -1095,7 +1095,7 @@
 
     def set_exec(f, mode):
         s = os.lstat(f).st_mode
-        if (s & 0100 != 0) == mode:
+        if stat.S_ISLNK(s) or (s & 0100 != 0) == mode:
             return
         if mode:
             # Turn on +x for every +r bit when making a file executable
--- a/tests/test-convert-git	Tue Oct 02 13:49:11 2007 -0700
+++ b/tests/test-convert-git	Tue Oct 02 13:49:36 2007 -0700
@@ -25,16 +25,26 @@
 cd git-repo
 git init-db >/dev/null 2>/dev/null
 echo a > a
-git add a
-commit -m t1
+mkdir d
+echo b > d/b
+git add a d
+commit -a -m t1
+
+# Remove the directory, then try to replace it with a file
+# (issue 754)
+git rm -r d
+commit -m t2
+echo d > d
+git add d
+commit -m t3
 
 echo b >> a
-commit -a -m t2.1
+commit -a -m t4.1
 
 git checkout -b other HEAD^ >/dev/null 2>/dev/null
 echo c > a
 echo a >> a
-commit -a -m t2.2
+commit -a -m t4.2
 
 git checkout master >/dev/null 2>/dev/null
 git pull --no-commit . other > /dev/null 2>/dev/null
--- a/tests/test-convert-git.out	Tue Oct 02 13:49:11 2007 -0700
+++ b/tests/test-convert-git.out	Tue Oct 02 13:49:36 2007 -0700
@@ -1,18 +1,21 @@
+rm 'd/b'
 assuming destination git-repo-hg
 initializing destination git-repo-hg repository
 scanning source...
 sorting...
 converting...
-3 t1
-2 t2.1
-1 t2.2
+5 t1
+4 t2
+3 t3
+2 t4.1
+1 t4.2
 0 Merge branch other
-changeset:   3:69b3a302b4a1
+changeset:   5:c6d72c98aa00
 tag:         tip
-parent:      1:0de2a40e261b
-parent:      2:8815d3b33506
+parent:      3:a18bdfccf429
+parent:      4:48cb5b72ce56
 user:        test <test@example.org>
-date:        Mon Jan 01 00:00:13 2007 +0000
+date:        Mon Jan 01 00:00:15 2007 +0000
 files:       a
 description:
 Merge branch other
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-debugindexdot	Tue Oct 02 13:49:36 2007 -0700
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Just exercize debugindexdot
+# Create a short file history including a merge.
+hg init t
+cd t
+echo a > a
+hg ci -qAm t1 -d '0 0'
+echo a >> a
+hg ci -m t2 -d '1 0'
+hg up -qC 0
+echo b >> a
+hg ci -m t3 -d '2 0'
+HGMERGE=true hg merge -q
+hg ci -m merge -d '3 0'
+
+hg debugindexdot .hg/store/data/a.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-debugindexdot.out	Tue Oct 02 13:49:36 2007 -0700
@@ -0,0 +1,7 @@
+digraph G {
+	-1 -> 0
+	0 -> 1
+	0 -> 2
+	2 -> 3
+	1 -> 3
+}