From: Sverre Rabbelier Date: Wed, 31 Aug 2011 12:58:38 GMT Subject: Re: done feature in remote-helpers (was Re: [PATCH 2/2] Add a remote helper to interact with mediawiki (fetch & push)) Message-ID: In-Reply-To: Heya, On Wed, Aug 31, 2011 at 14:55, Matthieu Moy wrote: > Err, no, it isn't. From git-remote-testgit.py: > > def do_import(repo, args): > [...] >    while True: >        line = sys.stdin.readline() > [...] >        # strip of leading 'import ' >        ref = line[7:].strip() >        refs.append(ref) > >    repo = update_local_repo(repo) >    repo.exporter.export_repo(repo.gitdir, refs) > >    print "done" > > What it does is that it reads multiple "import" commands, and process > them all at once, with a single "print done" at the end. Actually, > testgit would die("Expected import line.") if Git sent another command > after "import". Ah, see, this is why in my original version the syntax was: import refs/heads/master refs/heads/next \n Instead of the current: import refs/heads/master import refs/heads/next \n You can have multiple imports in the current system, you just need to remember to add the trailing newline. import refs/heads/master \n import refs/heads/next \n In the above case you'll have to have two done commands. -- Cheers, Sverre Rabbelier