All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Miller <aaronkmiller@gmail.com>
To: git@vger.kernel.org
Subject: git-p4: Clone p4 path with bidirectional integrations
Date: Mon, 19 Aug 2019 10:29:59 -0700	[thread overview]
Message-ID: <CALSvhyb7Td-ugzze9cSLXRjF78w=zE5=3yuMFZVeuXsCWLSjHg@mail.gmail.com> (raw)

Hi all,

Is it possible to `git p4 clone --detect-branches` from a Perforce
path which contains bidirectional integrations?

I've tried a bunch of things to get this to work, but here's an
example which hopefully illustrates what I'm trying to accomplish
and the issue I'm having.

Perforce setup, assuming PWD is mapped to //depot/... in your client spec:

  1. mkdir -p testing/master
  2. touch testing/master/test1 && p4 add testing/master/test1 && p4 submit
  3. p4 integrate //depot/testing/master/...
//depot/testing/staging/... && p4 submit
  3. touch testing/staging/test2 && p4 add testing/staging/test2 && p4 submit
  4. p4 integrate //depot/testing/staging/...
//depot/testing/master/... && p4 submit

Now try to clone with git-p4:

  1. git init p4_git_test && cd p4_git_test
  2. git config git-p4.branchList master:staging
  3. git config --add git-p4.branchList staging:master
  4. git p4 clone //depot/testing/...@all --detect-branches .

You end up with a failure like:

  Importing from //depot/testing/...@all into .
  Reinitialized existing Git repository in /home/amiller/p4_git_test/.git/
  Importing revision 1205832 (25%)
      Importing new branch testing/master

      Resuming with change 1205832
  fatal: ambiguous argument 'refs/remotes/p4/testing/staging': unknown
revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
  Command failed: ['git', 'rev-list', '--reverse', '--no-merges',
'refs/remotes/p4/testing/staging']

I'm using Git 2.22.1.

Thanks,
Aaron

             reply	other threads:[~2019-08-19 17:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 17:29 Aaron Miller [this message]
2019-08-19 20:23 ` git-p4: Clone p4 path with bidirectional integrations Luke Diamand
2019-08-20 22:52   ` Aaron Miller
2019-08-20  2:14 ` Andrey
2019-08-20 23:45   ` Aaron Miller
2019-08-23  3:06     ` Andrey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALSvhyb7Td-ugzze9cSLXRjF78w=zE5=3yuMFZVeuXsCWLSjHg@mail.gmail.com' \
    --to=aaronkmiller@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.