Stephen Rasku
Stephen Rasku

Reputation: 2682

Can't add files in perforce

As far as I can tell, my client is setup correctly:

$ p4 client -o
# A Perforce Client Specification.
# ...

Client: stephen-dev1-stephen

Update: 2014/06/26 17:41:14

Access: 2014/06/26 17:45:47

Owner:  StephenRasku

Host:   stephen-dev1

Description:
    Created by StephenRasku.

Root:   /home/stephen/Code

Options:    noallwrite noclobber nocompress unlocked nomodtime rmdir

SubmitOptions:  submitunchanged

LineEnd:    local

View:
    //depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...
    //version/... //stephen-dev1-stephen/version/...
    //thirdparty/... //stephen-dev1-stephen/thirdparty/...
    //starteam/... //stephen-dev1-stephen/starteam/...
    //specs/... //stephen-dev1-stephen/specs/...
    //release/... //stephen-dev1-stephen/release/...
    //projects/... //stephen-dev1-stephen/projects/...
    //main/... //stephen-dev1-stephen/main/...
    //features/... //stephen-dev1-stephen/features/...
    //dev/... //stephen-dev1-stephen/dev/...
    //depot/... //stephen-dev1-stephen/depot/...

The files exist:

$ pwd
/home/stephen/Code/SpamView-URI
$ ls mainline/EBUILD_VERSION mainline/package.sh mainline/ebuild
mainline/ebuild  mainline/EBUILD_VERSION  mainline/package.sh

But it complains when I try and add them:

$ p4 add mainline/EBUILD_VERSION mainline/package.sh mainline/ebuild
mainline/EBUILD_VERSION - file(s) not in client view.
mainline/package.sh - file(s) not in client view.
mainline/ebuild - file(s) not in client view.

What's the problem? I checked out the file using git p4 clone if that makes a difference.

Upvotes: 0

Views: 6389

Answers (2)

aflat
aflat

Reputation: 4329

Your client spec isn't right, as you noticed. With these 2 lines,

//depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/... //depot/... //stephen-dev1-stephen/depot/...

Your trying to map the files under //depot/labs/products/component/SpamView-URI/... to both //stephen-dev1-stephen/SpamView-URI/... and //stephen-dev1-stephen/depot/labs/products/component/SpamView-URI/... Since perforce reads top to bottom, it will overwrite your first mapping with the second mapping, basically removing the second mapping. \

Move your //depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/... to the last line, and you should be ok.

Upvotes: 0

P4Shimada
P4Shimada

Reputation: 803

Check the "View" lines in the client workspace specification to confirm that the file specification used in your Perforce command (or appearing in the error message) falls within your workspace view. If you see an error attempting to add a file, for example, you might want to check your mapping to confirm that the file resides in a directory that is within your client view.

See the section under 'Client Workspace View': http://answers.perforce.com/articles/KB_Article/Common-Permissions-and-File-Access-Problems

Are the files under this exact directory structure below?

  /home/stephen/Code/SpamView-URI/mainline/EBUILD_VERSION
  /home/stephen/Code/SpamView-URI/mainline/package.sh
  /home/stephen/Code/SpamView-URI/mainline/ebuild

Judging by the first View mapping line of:

  //depot/labs/products/component/SpamView-URI/... //stephen-dev1-stephen/SpamView-URI/...

I would guess that is the path they should be under. If you 'cd' into the '/home/stephen/Code/SpamView-URI/mainline' directory are you able to add these files?

Upvotes: 1

Related Questions