2009-12-08 5 views
1

Je p4 espace de travail client sur la machine Linux.Comment effectuer soumettre p4 opération sans description qui passe à l'intérieur du p4 soumettre le formulaire

J'ai ajouté/modifié quelques fichiers dans mon espace client et ensuite essayer de soumettre ces changements à serveur Perforce.

Je l'ai étapes ci-dessous mais ne pouvait pas réussir:

p4 submit -d "test"(même commande fonctionne sur la machine windows)

quand j'ai essayé avec juste p4 submit il p4 ouvert soumettre le formulaire, puis je l'ai remplacé [enter description ici] jeton avec une description correcte, puis cela fonctionne.

Mais je ne veux pas modifier soumettre p4 formulaire pour chaque p4 soumettre tâche.

Comment puis-je passer cette information à partir de l'invite de commande?

Answer

-d flag support for p4 submit command was not introduced in 
perforce 2006 version. so here is the workaround for this problem: 

    To modify the description field on pre-2006.2 release Perforce Servers, try 
    piping the change form in/out of a stream editor. This will create a numbered 
    changelist, which should then be submitted. 

    For example, something like: 

     p4 change -o | sed -e "s/<enter description here>/my desc/" | p4 change -i 

    Which gives the output, similar to: 

    Change 102 created with 3 open file(s). 

    This change (number 102 in this case) can then be submitted, as follows: 

     p4 submit -c 102 
+0

De quelle façon échouer? –

+1

Vous devriez poster des réponses comme des réponses - ne pas les ajouter à la question ... –

Répondre

0

Il est non seulement la description que vous devez entrer, vous pouvez également modifier la spécification changelist qui vous permet d'exclure certains fichiers de la validation.

Si vous pouvez le faire sur les fenêtres alors peut-être il y a un nouveau client sur les fenêtres que ce que vous utilisez sur Linux?

+0

En fait, mon client p4 ne supporte pas l'option -d flag avec p4 submit. Quelqu'un peut-il m'envoyer un lien de téléchargement de p4Commandlineclient qui supporte "-d flag" pour les commandes de soumission p4. – praveen

0

De http://www.perforce.com/perforce/downloads/platform.html télécharger la version appropriée du client de ligne de commande p4. Puis:

  1. Remplacez l'exécutable p4 existant par le nouveau.
  2. Ou mettre le nouveau p4 exe dans un répertoire plus tôt dans votre $PATH
  3. Faire le chmod 755 <new p4>
  4. hash -r
  5. p4 -V pour vérifier que vous utilisez Perforce 2009.1 client
  6. p4 help submit
  7. Nous pouvons MD5Sum le p4 binary
  8. p4 info et vérifiez que le serveur perforce est 2006.2 ou plus récent.

Étape 5 devrait produire:

$ p4 -V 
Perforce - The Fast Software Configuration Management System. 
Copyright 1995-2009 Perforce Software. All rights reserved. 
Rev. P4/LINUX26X86/2009.1/205670 (2009/06/29). 

Étape 6 devrait produire:

$ p4 help submit 

    submit -- Submit open files to the depot 

    p4 submit [ -r -s -f option ] 
    p4 submit [ -r -s -f option ] files 
    p4 submit [ -r -f option ] -d description 
    p4 submit [ -r -f option ] -d description files 
    p4 submit [ -r -f option ] -c changelist# 
    p4 submit -i [ -r -s -f option ] 

     'p4 submit' commits a pending changelist and its files to the depot. 

     With no argument 'p4 submit' attempts to submit all files in the 
     'default' changelist. Submit provides the user with a dialog 
     similar to 'p4 change' so the user can compose a changelist 
     description. In this dialog the user is presented with the list 
     of files open in changelist 'default'. Files may be deleted from 
     this list but they cannot be added. (Use an open command (edit, 
     add, delete) to add additional files to a changelist.) 

     If a (single) file pattern is given, only those files in 
     the 'default' changelist that match the pattern will be submitted. 

     The -c flag submits the numbered pending changelist that has been 
     previously created with 'p4 change' or a failed 'p4 submit'. 

     The -d flag allows a description to be passed into submit rather 
     than using a numbered changelist or engaging in a change description 
     dialog. This option is useful when scripting but does not allow for 
     jobs to be added or the default changelist to be modified. 

     The -f flag allows a submit option to be passed into submit which 
     will override the one that is set in the client. See 'p4 help client' 
     for valid submit options. 

     The -i flag causes a changelist specification (including files to be 
     submitted) to be read from the standard input. The user's editor 
     is not invoked. 

     The -r flag allows submitted files to remain open (on the client's 
     default changelist) after the submit has completed. 

     The -s flag extends the list of jobs to include the fix status 
     for each job, which becomes the job's status when the changelist 
     is committed. See 'p4 help change' for more notes on this option. 

     Before committing a changelist submit locks all associated files not 
     already locked. If any file cannot be locked, or if the submit 
     fails for any other reason the files are left open in a newly 
     created pending changelist. 

     Submit is guaranteed to be atomic. Either all files will be 
     updated in the depot as a unit or none will be. 

Dont le bit important est:

The -d flag allows a description to be passed into submit rather 
    than using a numbered changelist or engaging in a change description 
    dialog. This option is useful when scripting but does not allow for 
    jobs to be added or the default changelist to be modified. 

Étape 7:

$ md5sum $(which p4) 
bef01f66b8d3964c74a2d8992c0c900c /opt/perforce/bin/p4 

Étape 8:
La fonctionnalité a été introduite dans perforce 2006.2, et il est possible qu'il nécessite un serveur suffisamment récent pour supporter l'opération:

#106450 (Bug #258) ** 
'p4 submit' now sports a '-d description' option. This allows 
the user to submit files without the need for a changelist 
dialog. See 'p4 help submit'. 
+0

Déjà passé ce lien et essayé avec "Linux noyau 2.6 pour la plate-forme Intel (x86) 32 bits" pour le téléchargement de p4CommandLineClient. Mais encore p4 soumettre la commande ne supporte pas -d drapeau. J'ai fait "p4 help submit", il ne montrait pas de support de drapeau -d. – praveen

+0

Ensuite, vous n'avez pas téléchargé et installé la nouvelle version de p4. –

+0

J'ai testé mon client p4 avec la commande: p4 -V. il renvoie les informations du client 2009. "$ p4 -V Perforce - Le système de gestion de la configuration rapide du logiciel Copyright 1995-2009 Perforce Software.Tous droits réservés.Rev.P4/LINUX26X86/2009.1/205670 (2009/06/29)." Mais encore "p4 help submit" ne montre pas le support de -d flag – praveen

Questions connexes