summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-09 15:33:30 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-09 15:33:30 +0200
commite02e4d0dc1753582548e3aaee5bc73842ba87560 (patch)
tree91990281435fee001598586f18a81bfd03bce6ff
parente134e1ea861e4d5817e4f3278ef7c0b4dff374ea (diff)
parente0b5b30cf1b27aa63efddebad8652101a150cde8 (diff)
downloadbzr-fastimport-e02e4d0dc1753582548e3aaee5bc73842ba87560.tar.gz
Merge trunk.
-rwxr-xr-xexporters/darcs/darcs-fast-import15
-rw-r--r--exporters/darcs/t/lib.sh6
2 files changed, 15 insertions, 6 deletions
diff --git a/exporters/darcs/darcs-fast-import b/exporters/darcs/darcs-fast-import
index c50ab90..69ec7bb 100755
--- a/exporters/darcs/darcs-fast-import
+++ b/exporters/darcs/darcs-fast-import
@@ -155,6 +155,8 @@ class Handler:
sock.stdin.close()
self.log("Tagging %s:\n%s" % (version, sock.stdout.read()))
sock.stdout.close()
+ if sock.wait() != 0:
+ self.bug("darcs tag failed: '%s'" % sock.returncode)
def handle_commit(self):
if not self.prevfiles and self.options.import_marks:
@@ -249,12 +251,19 @@ class Handler:
return
for i in adds:
self.invoke_add(i)
- sock = subprocess.Popen(["darcs", "record", "--ignore-times", "-a", "--pipe"], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- buf = [self.date, self.ident, self.short, self.long]
- sock.stdin.write("\n".join(buf))
+ args = ["darcs", "record", "--ignore-times", "-a", "--pipe"]
+ buf = [self.date, self.ident]
+ if not len(self.short):
+ args.extend(['-m', ''])
+ else:
+ buf.extend([self.short, self.long])
+ sock = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ sock.stdin.write("\n".join(buf)+"\n")
sock.stdin.close()
self.log("Recording :%s:\n%s" % (self.mark_num, sock.stdout.read()))
sock.stdout.close()
+ if sock.wait() != 0:
+ self.bug("darcs record failed: '%s'" % sock.returncode)
for src, path in symlinks:
# symlink does not do what we want if path is
diff --git a/exporters/darcs/t/lib.sh b/exporters/darcs/t/lib.sh
index 095f9ef..7d2218a 100644
--- a/exporters/darcs/t/lib.sh
+++ b/exporters/darcs/t/lib.sh
@@ -262,7 +262,7 @@ diff_importgit()
diff_importhg()
{
- test -z "`(cd $1.darcs; darcs diff)`" &&
+ cd $1.darcs && test -z "`darcs diff 2>&1`" && cd .. &&
diff --exclude _darcs --exclude .hg --exclude '*-darcs-backup*' --exclude 'hg-export.*' \
--exclude '.hgtags' --exclude '*.orig' -Nur $1 $1.darcs
return $?
@@ -270,14 +270,14 @@ diff_importhg()
diff_importdarcs()
{
- test -z "`(cd $1.darcs; darcs diff)`" &&
+ cd $1.importdarcs && test -z "`darcs diff 2>&1`" && cd .. &&
diff --exclude _darcs --exclude '*-darcs-backup*' -Nur $1 $2
return $?
}
diff_importbzr()
{
- test -z "`(cd $1.darcs; darcs diff)`" &&
+ cd $1.darcs && test -z "`darcs diff 2>&1`" && cd .. &&
diff --exclude _darcs --exclude .bzr --exclude '*-darcs-backup*' -Nur $1 $1.darcs
return $?
}