git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Hausmann <simon@lst.de>
To: Kevin Green <Kevin.T.Green@morganstanley.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-p4: check for existence of repo dir before trying to create [Was: Asking again... [Re: how to properly import perforce history?]]
Date: Mon, 11 Jun 2007 23:32:43 +0200	[thread overview]
Message-ID: <200706112332.46996.simon@lst.de> (raw)
In-Reply-To: <20070611205140.GN25093@menevado.ms.com>

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

On Monday 11 June 2007 22:51:40 Kevin Green wrote:
[...]
> Anyway, grabbed git-p4 and tried it three ways:
>
> 1) git-p4 clone //depot/path/repo@all
>
>   I don't like this because it creates a git repository under "repo"
> subdir. To make a long store short, we have a very strict namespace for
>   development...  The path ends in src and I'd like the .git repository to
> be under src.

Fair enough :)

> So, I tried this one level up:
>
> 2) git-p4 clone //depot/path/repo@all src
>
> 	But that dies with a mkdir error because 'src' already exists.  I want to
> 	submit a patch, but wanted to check with you first to see if that's the
> 	desired behaviour (I don't think it should fail though) because maybe you
> 	want to stop someone from scribbling on an already present git repository?
>
> 	I would want to just go for a "if it doesn't exist yet, create it,
> 	otherwise, forge ahead" behaviour.  I attach the patch after my .sig...

Thanks for the patch. Applied and pushed out.

> 3) Tried without clone:
>
> $ git init
> $ git-p4 sync //depot/path/repo@all
>
> 	This looks like it's pulling down all the revisions, but it doesn't
> 	actually put any code in there.  I'm left with the same situation as
> 	git-p4import.py.
>
> 	Actually, not even.  I don't even have the commit history...

Actually... the import worked just fine, but I admit that it is not obvious 
_where_ the import went. I've just pushed out a change that makes git-p4 sync 
in this case also print out the ref. By default git-p4 sync imports into 
refs/remotes/p4/master, so after the above command a simple

	git branch -r

should print

	p4/HEAD
	p4/master

so you could for example just create a new master branch based on your p4 
import using

	git branch master p4
	git checkout master

I hope this helps :)

Simon

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2007-06-11 21:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 20:22 how to properly import perforce history Kevin Green
2007-06-11 14:25 ` Asking again... [Re: how to properly import perforce history?] Kevin Green
2007-06-11 14:56   ` Simon Hausmann
2007-06-11 15:44     ` Alex Riesen
2007-06-11 18:42       ` Simon Hausmann
2007-06-11 20:12         ` Alex Riesen
2007-06-11 21:20           ` Scott Lamb
2007-06-11 23:16             ` Alex Riesen
2007-06-11 23:41               ` Scott Lamb
2007-06-11 21:46           ` Simon Hausmann
2007-06-12  1:19             ` Han-Wen Nienhuys
2007-06-12 14:12             ` Alex Riesen
2007-06-11 16:41     ` Kevin Green
2007-06-11 20:28       ` Alex Riesen
     [not found]     ` <20070611194450.GK25093@menevado.ms.com>
     [not found]       ` <200706112159.34181.simon@lst.de>
2007-06-11 20:51         ` [PATCH] git-p4: check for existence of repo dir before trying to create [Was: Asking again... [Re: how to properly import perforce history?]] Kevin Green
2007-06-11 21:32           ` Simon Hausmann [this message]

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=200706112332.46996.simon@lst.de \
    --to=simon@lst.de \
    --cc=Kevin.T.Green@morganstanley.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).