# Re: [PATCH] Optional shrinking of RCS keywords in git-p4

2 messages from 2008-09-16 to 2008-09-16. Participants: dhruva, Daniel Barkalow.
Thread: https://gitlist.dev/t/15543

## dhruva, 2008-09-16 04:53

Subject: Re: [PATCH] Optional shrinking of RCS keywords in git-p4
Message-ID: <98627.82548.qm@web95002.mail.in2.yahoo.com>
URL: https://gitlist.dev/e/98627.82548.qm%40web95002.mail.in2.yahoo.com

```
Hi,



----- Original Message ----
> From: David Brown <git@davidb.org>
> Part of the problem is that p4 isn't very good at knowing whether
> files have changed or not.  'p4 sync' will update the file _if_ if
> thinks your version is out of date, but it does nothing if someone has
> locally modified the file, hence the need for the 'p4 sync -f'.

If you have modified a file without doing a 'p4 edit' and if there is a new version of the edited file on p4 (from what you have got from a previous 'p4 sync'), 'p4 sync' will overwrite your changes (if the file does not have write perm set or if you have enabled clobbering of writable files). Whereas 'p4 sync -f' will always overwrite all unopened files if a newer version is available.

-dhruva



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

```

## Daniel Barkalow, 2008-09-16 17:26

Subject: Re: [PATCH] Optional shrinking of RCS keywords in git-p4
Message-ID: <alpine.LNX.1.00.0809161316030.19665@iabervon.org>
URL: https://gitlist.dev/e/alpine.LNX.1.00.0809161316030.19665%40iabervon.org
In-Reply-To: <98627.82548.qm@web95002.mail.in2.yahoo.com>

```
On Tue, 16 Sep 2008, dhruva wrote:

> Hi,
> 
> 
> 
> ----- Original Message ----
> > From: David Brown <git@davidb.org>
> > Part of the problem is that p4 isn't very good at knowing whether
> > files have changed or not.  'p4 sync' will update the file _if_ if
> > thinks your version is out of date, but it does nothing if someone has
> > locally modified the file, hence the need for the 'p4 sync -f'.
> 
> If you have modified a file without doing a 'p4 edit' and if there is a 
> new version of the edited file on p4 (from what you have got from a 
> previous 'p4 sync'), 'p4 sync' will overwrite your changes (if the file 
> does not have write perm set or if you have enabled clobbering of 
> writable files). Whereas 'p4 sync -f' will always overwrite all unopened 
> files if a newer version is available.  

p4 sync -f will overwrite all unopened files. It will clobber writable 
files, and it will clobber files where there isn't a newer file (it's one 
of the ways of dealing with accidentally erasing your workspace).

	-Daniel
*This .sig left intentionally blank*

```
