Re: Yet another git perforce integration

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

 



On 5/8/07, Simon Hausmann <simon@xxxxxx> wrote:

git-p4 submit

is used to submit changes back into Perforce (use at your own risk! :)

right, because you have to know where (and when) your perforce repo is,
and then where and when your copy (in Git) is, copy the p4 changes,
rebase your changes on top of the just copied changes (p4 history
is linear), try to submit, watch out for fails, because someone else could
have submitted something, possibly resync and repeat. Cursing and
swearing notwithstanding.
I simplified the operation  by promising to hit everyone who submits
anything in my domain (and was supported by the local P4 sysadms,
so it worked).

The import itself uses git-fast-import, so it's very fast. There is also no
need to have the imported Perforce projects in the Perforce client view as it
just uses "p4 changes //depot/path" and "p4
print //depot/path/file#revision", which I find very convenient and still
fast enough for use (since of course only changed files are printed).

I confirm that, but could not use the same approach in git-p4-import
I posted earlier: I don't control the sync operation, and the stupid prog
that does the sync does not allow in-client operation (p4 sync -n).
I just have to work somehow with the junk it left in working directory

It also doesn't require any additional meta-data. Instead every import commit
has a line added to the log message that contains the Perforce path the
changeset comes from as well as the change number. git-p4
sync/rebase "parses" this on the last commit in the "p4" git branch to find
out where to continue importing for incremental imports.

How do you handle that patchwork of mappings synced to diverse revisions
that P4 clients tend to become? Don't you have to save change number or
revision for _each_ file?

What's still missing is a bit of cleanup. For example I'd like to put the
import branch into refs/remotes instead of refs/heads, but I've had some
problems with fast-import when trying that. Also the support for Perforce
branches isn't quite working yet.

AFACS, it is impossible: Perforce does not have branches (in Git's meaning
of the word). It only has directories. Integration (it is something like
"in-repo-copy") metadata are just duct-taped on it (that stupid branchspec).

Also I've never tried it on Windows and I expect problems as the script uses
pipes, calls "patch", etc.

...and case-sensitivity. BTW, how does your script handle filenames with
special characters and spaces in them?
-
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]

  Powered by Linux