You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "gary (guangyuan) sun" <ga...@yahoo.com> on 2007/11/27 18:08:16 UTC

HowTo: directly modify a file on repos

Hi all,

I always need to add a line to a file which is in my
repository. I did that by 3 steps: checkout, modify
(add a line), and commit.

I don't like checkout the file to my wc again and
again. Can I directly add a line to the file and
commit it to my repository?

Thanks

Gary


      ____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: HowTo: directly modify a file on repos

Posted by Hari Kodungallur <hk...@gmail.com>.
On Nov 27, 2007 10:08 AM, gary (guangyuan) sun <ga...@yahoo.com> wrote:

> Hi all,
>
> I always need to add a line to a file which is in my
> repository. I did that by 3 steps: checkout, modify
> (add a line), and commit.
>
> I don't like checkout the file to my wc again and
> again. Can I directly add a line to the file and
> commit it to my repository?
>
In the tools/examples folder of the subversion source distribution, there is
a file called svnput.c. You may be able to use it. It probably should be
used if you are really sure of what you are doing. Do read the warning at
the top of the file.
That said, given a choice, I will write a script to checkout, update and
commit (as pointed out by Sohail).

Thanks,
-Hari

Re: HowTo: directly modify a file on repos

Posted by Sohail Somani <so...@taggedtype.net>.
On Tue, 27 Nov 2007 10:08:16 -0800, gary \(guangyuan\) sun wrote:

> Hi all,
> 
> I always need to add a line to a file which is in my repository. I did
> that by 3 steps: checkout, modify (add a line), and commit.
> 
> I don't like checkout the file to my wc again and again. Can I directly
> add a line to the file and commit it to my repository?
> 
> Thanks

Just write a script:

#!/bin/bash
#editfile.sh <url>

tmpdir=/tmp/$$
mkdir $tmpdir
svn co `dirname $1` $tmpdir
$EDITOR $tmpdir/`basename $1`
svn commit $tmpdir

Should work... :-)

-- 
Sohail Somani
http://uint32t.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: HowTo: directly modify a file on repos

Posted by Les Mikesell <le...@gmail.com>.
gary (guangyuan) sun wrote:
> Hi all,
> 
> I always need to add a line to a file which is in my
> repository. I did that by 3 steps: checkout, modify
> (add a line), and commit.
> 
> I don't like checkout the file to my wc again and
> again. Can I directly add a line to the file and
> commit it to my repository?

The usual procedure is to keep your checked out working copy in place, 
updating periodically if others are also making changes.  Then you just 
make your change and commit each time.

-- 
   Les Mikesell
    lesmikesell@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org