You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Hung <cy...@gmail.com> on 2006/09/08 21:27:34 UTC

How to do "svn status -r1000"?

Let assume that my working copy is at revision 990. I made changes to a few
files and directory trees. The head revision of the repository is 1100. But
I just want to update my working to 1000. Before I do the update, I actually
want to see what are the changes between my working copy and revision 1000
in the repository. It seems to me that svn status does not accept -r.

Re: How to do "svn status -r1000"?

Posted by Kevin Hung <cy...@gmail.com>.
Hi Duncan,

Thanks for pointing out the differece between "svn status" and "svn diff". I
guess what I am looking for is the exact combination of both. So I will just
use both at the same time.

Thanks.

On 9/9/06, Duncan Murdoch <mu...@stats.uwo.ca> wrote:
>
> On 9/9/2006 3:07 AM, Kevin Hung wrote:
> > Sorry that I did not state it clearly in my last posting. When I say
> "new
> > files or new directories", I mean the new files and new directories that
> I
> > create in my working copy. They have not been added nor committed to the
> > repository.
>
> If they haven't been added or committed, then the revision number is
> irrelevant:  they aren't under version control.  Use svn status to list
> them.  It tells about the status of your working copy, and will list
> those files with ? entries (unless you've configured svn to ignore them,
> as you might do for object files, etc.).
>
> svn diff will tell you about files that are under version control.  You
> need to add those files, then you can see a diff versus whichever
> version you want.
>
> Duncan Murdoch
>
> >
> > I have actually created a test repository and tried things out. So far,
> I
> > have tried these two commands:
> >
> > "svn diff -r 1000 ."
> > "svn diff -r 990:1000 ."
> >
> > I think the first command compares my working copy to revision 1000 in
> the
> > repository. However, this does not show any new file or new directory
> that I
> > create in my working copy.
> >
> > The second command compares revision 990 and revision 1000 in the
> > repository. It does not look at my working copy.
> >
> > I have also tried this,
> >
> > svn diff /home/wc https://repos/proj@1000
> >
> > But I get an error message from svn.
> >
> >
> >
> > On 9/8/06, Blair Zajac <bl...@orcaware.com> wrote:
> >> Kevin Hung wrote:
> >>> Hi Blair,
> >>>
> >>> Just want to confirm the answer to my first question. Is it true that
> >>> there is no way to have "svn diff" to show new files or new
> directories?
> >>> Would this feature be included in future release?
> >> No, that's not true.  If you do a diff on a revision range that
> includes
> >> an
> >> added file, then the diff, either against the wc or the server, will
> show
> >> the diff.
> >>
> >> BTW, you can always test things out very quickly using a test
> repository:
> >>
> >> svnadmin create repos
> >> svn co file://`pwd`/repos wc
> >> cd wc
> >> cp /etc/motd .
> >> svn add motd
> >> svn ci -m ''
> >> cd ..
> >> svn diff -r 0:1 file://`pwd`/repos
> >>
> >>
> >> Regards,
> >> Blair
> >>
> >
>
>

Re: How to do "svn status -r1000"?

Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
On 9/9/2006 3:07 AM, Kevin Hung wrote:
> Sorry that I did not state it clearly in my last posting. When I say "new
> files or new directories", I mean the new files and new directories that I
> create in my working copy. They have not been added nor committed to the
> repository.

If they haven't been added or committed, then the revision number is 
irrelevant:  they aren't under version control.  Use svn status to list 
them.  It tells about the status of your working copy, and will list 
those files with ? entries (unless you've configured svn to ignore them, 
as you might do for object files, etc.).

svn diff will tell you about files that are under version control.  You 
need to add those files, then you can see a diff versus whichever 
version you want.

Duncan Murdoch

> 
> I have actually created a test repository and tried things out. So far, I
> have tried these two commands:
> 
> "svn diff -r 1000 ."
> "svn diff -r 990:1000 ."
> 
> I think the first command compares my working copy to revision 1000 in the
> repository. However, this does not show any new file or new directory that I
> create in my working copy.
> 
> The second command compares revision 990 and revision 1000 in the
> repository. It does not look at my working copy.
> 
> I have also tried this,
> 
> svn diff /home/wc https://repos/proj@1000
> 
> But I get an error message from svn.
> 
> 
> 
> On 9/8/06, Blair Zajac <bl...@orcaware.com> wrote:
>> Kevin Hung wrote:
>>> Hi Blair,
>>>
>>> Just want to confirm the answer to my first question. Is it true that
>>> there is no way to have "svn diff" to show new files or new directories?
>>> Would this feature be included in future release?
>> No, that's not true.  If you do a diff on a revision range that includes
>> an
>> added file, then the diff, either against the wc or the server, will show
>> the diff.
>>
>> BTW, you can always test things out very quickly using a test repository:
>>
>> svnadmin create repos
>> svn co file://`pwd`/repos wc
>> cd wc
>> cp /etc/motd .
>> svn add motd
>> svn ci -m ''
>> cd ..
>> svn diff -r 0:1 file://`pwd`/repos
>>
>>
>> Regards,
>> Blair
>>
> 

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

Re: How to do "svn status -r1000"?

Posted by Kevin Hung <cy...@gmail.com>.
Sorry that I did not state it clearly in my last posting. When I say "new
files or new directories", I mean the new files and new directories that I
create in my working copy. They have not been added nor committed to the
repository.

I have actually created a test repository and tried things out. So far, I
have tried these two commands:

"svn diff -r 1000 ."
"svn diff -r 990:1000 ."

I think the first command compares my working copy to revision 1000 in the
repository. However, this does not show any new file or new directory that I
create in my working copy.

The second command compares revision 990 and revision 1000 in the
repository. It does not look at my working copy.

I have also tried this,

svn diff /home/wc https://repos/proj@1000

But I get an error message from svn.



On 9/8/06, Blair Zajac <bl...@orcaware.com> wrote:
>
> Kevin Hung wrote:
> > Hi Blair,
> >
> > Just want to confirm the answer to my first question. Is it true that
> > there is no way to have "svn diff" to show new files or new directories?
> > Would this feature be included in future release?
>
> No, that's not true.  If you do a diff on a revision range that includes
> an
> added file, then the diff, either against the wc or the server, will show
> the diff.
>
> BTW, you can always test things out very quickly using a test repository:
>
> svnadmin create repos
> svn co file://`pwd`/repos wc
> cd wc
> cp /etc/motd .
> svn add motd
> svn ci -m ''
> cd ..
> svn diff -r 0:1 file://`pwd`/repos
>
>
> Regards,
> Blair
>

Re: How to do "svn status -r1000"?

Posted by Blair Zajac <bl...@orcaware.com>.
Kevin Hung wrote:
> Hi Blair,
> 
> Just want to confirm the answer to my first question. Is it true that 
> there is no way to have "svn diff" to show new files or new directories? 
> Would this feature be included in future release?

No, that's not true.  If you do a diff on a revision range that includes an 
added file, then the diff, either against the wc or the server, will show the diff.

BTW, you can always test things out very quickly using a test repository:

svnadmin create repos
svn co file://`pwd`/repos wc
cd wc
cp /etc/motd .
svn add motd
svn ci -m ''
cd ..
svn diff -r 0:1 file://`pwd`/repos


Regards,
Blair

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

Re: How to do "svn status -r1000"?

Posted by Kevin Hung <cy...@gmail.com>.
Hi Blair,

Just want to confirm the answer to my first question. Is it true that there
is no way to have "svn diff" to show new files or new directories? Would
this feature be included in future release?

On 9/8/06, Blair Zajac <bl...@orcaware.com> wrote:
>
> Kevin Hung wrote:
> > Thanks for the suggestion. I tried out "svn diff" but there are two
> > problems.
> >
> > (1) If I create new files or directories in my working copy, "svn diff"
> > does not show it. Is there a way to get around it.
>
> The diff command I showed won't show new files in your working copy since
> you're
> not asking for it.  You asked to see what's new in the server since you
> last did
> your update or checkout.
>
> >
> > (2) "svn diff" also shows the difference between two files on screen.
> > Can I just have "svn diff" to show the filename that differs (like svn
> > status).
>
> Not until 1.4.0 comes out, which has a --summarize option which will do
> this.
>
> Regards,
> Blair
>

Re: How to do "svn status -r1000"?

Posted by Blair Zajac <bl...@orcaware.com>.
Kevin Hung wrote:
> Thanks for the suggestion. I tried out "svn diff" but there are two 
> problems.
> 
> (1) If I create new files or directories in my working copy, "svn diff" 
> does not show it. Is there a way to get around it.

The diff command I showed won't show new files in your working copy since you're 
not asking for it.  You asked to see what's new in the server since you last did 
your update or checkout.

> 
> (2) "svn diff" also shows the difference between two files on screen. 
> Can I just have "svn diff" to show the filename that differs (like svn 
> status).

Not until 1.4.0 comes out, which has a --summarize option which will do this.

Regards,
Blair

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

Re: How to do "svn status -r1000"?

Posted by Kevin Hung <cy...@gmail.com>.
Thanks for the suggestion. I tried out "svn diff" but there are two
problems.

(1) If I create new files or directories in my working copy, "svn diff" does
not show it. Is there a way to get around it.

(2) "svn diff" also shows the difference between two files on screen. Can I
just have "svn diff" to show the filename that differs (like svn status).

Actually "svn diff" is pretty good. It also works when I change svn
properties in my working copy.


On 9/8/06, Blair Zajac <bl...@orcaware.com> wrote:
>
> Kevin Hung wrote:
> > Let assume that my working copy is at revision 990. I made changes to a
> > few files and directory trees. The head revision of the repository is
> > 1100. But I just want to update my working to 1000. Before I do the
> > update, I actually want to see what are the changes between my working
> > copy and revision 1000 in the repository. It seems to me that svn status
> > does not accept -r.
>
> You can run
>
> svn diff -r BASE:1000
>
> to see what changes you would pull down.
>
> Regards,
> Blair
>
> --
> Blair Zajac, Ph.D.
> http://www.orcaware.com/svn/
>

Re: How to do "svn status -r1000"?

Posted by Blair Zajac <bl...@orcaware.com>.
Kevin Hung wrote:
> Let assume that my working copy is at revision 990. I made changes to a 
> few files and directory trees. The head revision of the repository is 
> 1100. But I just want to update my working to 1000. Before I do the 
> update, I actually want to see what are the changes between my working 
> copy and revision 1000 in the repository. It seems to me that svn status 
> does not accept -r.

You can run

svn diff -r BASE:1000

to see what changes you would pull down.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
http://www.orcaware.com/svn/

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

Re: How to do "svn status -r1000"?

Posted by Kevin Hung <cy...@gmail.com>.
Good guess but "svn status" does not take -r as option. As mentioned by
Duncan (later post), I need to use "svn status" for new files or new
directories in my working copy and "svn diff" for files that are already
under version control.

On 9/9/06, Erik Huelsmann <eh...@gmail.com> wrote:
>
> On 9/8/06, Kevin Hung <cy...@gmail.com> wrote:
> > Let assume that my working copy is at revision 990. I made changes to a
> few
> > files and directory trees. The head revision of the repository is 1100.
> But
> > I just want to update my working to 1000. Before I do the update, I
> actually
> > want to see what are the changes between my working copy and revision
> 1000
> > in the repository. It seems to me that svn status does not accept -r.
>
> svn status -u -r ... ?
>
> Just a guess...
>
> Erik.
>

Re: How to do "svn status -r1000"?

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/8/06, Kevin Hung <cy...@gmail.com> wrote:
> Let assume that my working copy is at revision 990. I made changes to a few
> files and directory trees. The head revision of the repository is 1100. But
> I just want to update my working to 1000. Before I do the update, I actually
> want to see what are the changes between my working copy and revision 1000
> in the repository. It seems to me that svn status does not accept -r.

svn status -u -r ... ?

Just a guess...

Erik.

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