summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2010-06-27 23:03:53 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2010-06-27 23:03:53 +0200
commit731ecf0257e9860c0e0d36722150d9a36d4743ae (patch)
tree93b1b9757374e83d44d075d74e75f264103f8b60
parent852222f41bc7cdf7452289625341c3c6dfa9a7b1 (diff)
downloadbzr-fastimport-731ecf0257e9860c0e0d36722150d9a36d4743ae.tar.gz
darcs-fast-import: Create symlinks after darcs record
Otherwise darcs diff will show the file removals but even darcs record -a won't record them.
-rwxr-xr-xexporters/darcs/darcs-fast-import14
1 files changed, 7 insertions, 7 deletions
diff --git a/exporters/darcs/darcs-fast-import b/exporters/darcs/darcs-fast-import
index fb6a7a2..ff788fa 100755
--- a/exporters/darcs/darcs-fast-import
+++ b/exporters/darcs/darcs-fast-import
@@ -240,6 +240,13 @@ class Handler:
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))
+ sock.stdin.close()
+ self.log("Recording :%s:\n%s" % (self.mark_num, sock.stdout.read()))
+ sock.stdout.close()
+
for src, path in symlinks:
# symlink does not do what we want if path is
# already there
@@ -250,13 +257,6 @@ class Handler:
else:
shutil.rmtree(path)
os.symlink(src, path)
- 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))
- sock.stdin.close()
- self.log("Recording :%s:\n%s" % (self.mark_num, sock.stdout.read()))
- sock.stdout.close()
-
if self.options.export_marks:
# yeah, an xml parser would be better, but
# should we mess with encodings just because of