Re: done feature in remote-helpers (was Re: [PATCH 2/2] Add a remote helper to interact with mediawiki (fetch & push))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heya,

On Wed, Aug 31, 2011 at 14:55, Matthieu Moy
<Matthieu.Moy@xxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]