[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: HowTo: directly modify a file on repos

From: Sohail Somani <sohail_at_taggedtype.net>
Date: 2007-11-27 19:25:39 CET

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
Received on Tue Nov 27 19:26:59 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.