def get_pull_command(self, remote=None, revision=None):
if revision:<EOL><INDENT>revision = '<STR_LIT>' % (revision, revision)<EOL><DEDENT>if self.bare:<EOL><INDENT>return [<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>remote or '<STR_LIT>',<EOL>revision or '<STR_LIT>',<EOL>]<EOL><DEDENT>else:<EOL><INDENT>command = ['<STR_LIT>', '<STR_LIT>']<EOL>if remote or revision:<EOL><INDENT>command.append(remote or '<STR_LIT>')<EOL>if revision:<EOL><INDENT>command.append(revision)<EOL><DEDENT><DEDENT><DEDENT>return command<EOL>
Get the command to pull changes from a remote repository into the local repository.

When you pull a specific branch using git, the default behavior is to
pull the change sets from the remote branch into the local repository
and merge them into the *currently checked out* branch.

What Mercurial does is to pull the change sets from the remote branch
into the local repository and create a local branch whose contents
mirror those of the remote branch. Merging is left to the operator.

In my opinion the default behavior of Mercurial is more sane and
predictable than the default behavior of git and so :class:`GitRepo`
tries to emulate the default behavior of Mercurial.

When a specific revision is pulled, the revision is assumed to be a
branch name and git is instructed to pull the change sets from the
remote branch into a local branch with the same name.

.. warning:: The logic described above will undoubtedly break when
             `revision` is given but is not a branch name. I'd fix
             this if I knew how to, but I don't...