You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peng Yu <pe...@gmail.com> on 2010/05/24 21:40:06 UTC

Automatic commission?

It seems that I have to specify which file or files to commit. This
will be a problem if I always simultaneously edit tens of files before
I can do a commission. Is there an automatic way to figure out which
files should be commit and commit them?

-- 
Regards,
Peng

Re: Automatic commission?

Posted by Stanimir Stamenkov <s7...@netscape.net>.
Mon, 24 May 2010 16:40:06 -0500, /Peng Yu/:

> It seems that I have to specify which file or files to commit. This 
> will be a problem if I always simultaneously edit tens of files before 
> I can do a commission. Is there an automatic way to figure out which 
> files should be commit and commit them?

I don't think a mind reader control has been developed yet :-) but you 
could use changelists to group files and then operate on these groups:

http://svnbook.red-bean.com/nightly/en/svn.advanced.changelists.html
http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.changelist.html

-- 
Stanimir

RE: Automatic commission?

Posted by Thomas Loy <Th...@cbeyond.net>.
No.  You must use the SVN rename.

Regards,

Tom


-----Original Message-----
From: Peng Yu [mailto:pengyu.ut@gmail.com] 
Sent: Monday, May 24, 2010 5:54 PM
To: Daniel Becroft
Cc: users
Subject: Re: Automatic commission?

On Mon, May 24, 2010 at 4:46 PM, Daniel Becroft <dj...@gmail.com> wrote:
> On Tue, May 25, 2010 at 7:40 AM, Peng Yu <pe...@gmail.com> wrote:
>> It seems that I have to specify which file or files to commit. This
>> will be a problem if I always simultaneously edit tens of files before
>> I can do a commission. Is there an automatic way to figure out which
>> files should be commit and commit them?
>
> You can not specify anything, and it will commit all changes (e.g. svn
> commit -m ....).
>
> See the book for an example:
> http://svnbook.red-bean.com/nightly/en/svn.tour.cycle.html#svn.tour.cycle.commit

If I rename the files locally without using svn command, then I commit
without any arguments. Will the command 'commit' be able to figure
about the file with new name is modified from the old file?

-- 
Regards,
Peng

Re: Automatic commission?

Posted by Ryan Schmidt <su...@ryandesign.com>.
Don't forget to Reply All so this discussion stays on the mailing list.

On May 24, 2010, at 17:57, Peng Yu wrote:
> On Mon, May 24, 2010 at 5:08 PM, Ryan Schmidt wrote:
>> On May 24, 2010, at 17:03, Peng Yu wrote:
>>> I might change filenames or even move files around several times
>>> before I 'commit'. Since I need tell svn the renames and moves that I
>>> have done, does svn keep all the intermediate changes when I finally
>>> 'commit'.
>>> 
>>> I think that svn should not keep track of the intermediate changes
>>> after 'commit'. But I'm not sure if svn is doing so. Could you please
>>> let me know if it is the case?
>> 
>> Why don't you try it out in a test repository and see if it works like you need it to.
> 
> I could also ask you why don't answer me if you know it? :)

I think it works but I don't know for sure. We are all Subversion users here; we're volunteering to provide help on this mailing list; we're not paid to do this. I don't want to spend my time figuring out answers to things you could figure out yourself if you just tried it out.


> I don't have an version control system yet. And I'm deciding which one
> to use. I have to know if a version control system can do what I need
> before I committed to use it.

It's not hard to download Subversion, create a test repository, follow some of the examples in the book to get used to how it works, then see if it meets the specific needs you're asking about.


Re: Automatic commission?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 24, 2010, at 17:03, Peng Yu wrote:

> I might change filenames or even move files around several times
> before I 'commit'. Since I need tell svn the renames and moves that I
> have done, does svn keep all the intermediate changes when I finally
> 'commit'.
> 
> I think that svn should not keep track of the intermediate changes
> after 'commit'. But I'm not sure if svn is doing so. Could you please
> let me know if it is the case?

Why don't you try it out in a test repository and see if it works like you need it to.


Re: Automatic commission?

Posted by David Weintraub <qa...@gmail.com>.
On Mon, May 24, 2010 at 6:03 PM, Peng Yu <pe...@gmail.com> wrote:
> I might change filenames or even move files around several times
> before I 'commit'. Since I need tell svn the renames and moves that I
> have done, does svn keep all the intermediate changes when I finally
> 'commit'.
>
> I think that svn should not keep track of the intermediate changes
> after 'commit'. But I'm not sure if svn is doing so. Could you please
> let me know if it is the case?

Do you know that most version control systems don't track renaming and
moving at all? Subversion is one of the few that does it. In fact, I
don't know of any version control system that can track random file
renaming with the operating system rename/move commands.

Normally, once you name a file or place a file in a particular
directory, you don't change it because it causes confusion. In many
version control systems, the renamed or moved file is not the same as
the old one, and in the version control systems that support renaming,
moving or renaming files causes user confusion. You simply don't do it
unless you have to.

However, to answer your question, as long as you use Subversion's move
command, Subversion will track everything until you get the final name
you want:

$ ls
bar  foo

$ svn mv foo barfoo
D   foo
C   barfoo

$ls
bar    barfoo

$ svn mv barfoo foobar
D  barfoo
C  foobar

$svn status
D  foo
C  barfoo

As others have suggested, why not download Subversion? It's free and
there are no licenses. Follow the examples in the book at
http://svnbook.com. See if it does what you want.

That will answer most of your questions on how Subversion works. You
can find the right binary on:
<http://subversion.apache.org/packages.html>.

-- 
David Weintraub
qazwart@gmail.com

Re: Automatic commission?

Posted by Peng Yu <pe...@gmail.com>.
On Mon, May 24, 2010 at 4:57 PM, David Weintraub <qa...@gmail.com> wrote:
> On Mon, May 24, 2010 at 5:54 PM, Peng Yu <pe...@gmail.com> wrote:
>> On Mon, May 24, 2010 at 4:46 PM, Daniel Becroft <dj...@gmail.com> wrote:
>>> On Tue, May 25, 2010 at 7:40 AM, Peng Yu <pe...@gmail.com> wrote:
>>>> It seems that I have to specify which file or files to commit. This
>>>> will be a problem if I always simultaneously edit tens of files before
>>>> I can do a commission. Is there an automatic way to figure out which
>>>> files should be commit and commit them?
>
> No. If you want Subversion to know you've renamed a file, you have to
> tell Subversion. Subversion doesn't sit there and watch all of your
> keystrokes, so it doesn't know if you modified a file's name.
>
> If you use "svn mv" or "svn rename" instead of the operating system
> command for renaming or moving a file, Subversion will know that
> you've renamed a file, and will also show that change in your working
> directory:
>
> $ ls
> foo     bar
>
> $ svn mv foo fu
>
> $ ls
> fu     bar
>
> So, if you need to rename a file, you just need to use the Subversion command.

I might change filenames or even move files around several times
before I 'commit'. Since I need tell svn the renames and moves that I
have done, does svn keep all the intermediate changes when I finally
'commit'.

I think that svn should not keep track of the intermediate changes
after 'commit'. But I'm not sure if svn is doing so. Could you please
let me know if it is the case?

-- 
Regards,
Peng

Re: Automatic commission?

Posted by David Weintraub <qa...@gmail.com>.
On Mon, May 24, 2010 at 5:54 PM, Peng Yu <pe...@gmail.com> wrote:
> On Mon, May 24, 2010 at 4:46 PM, Daniel Becroft <dj...@gmail.com> wrote:
>> On Tue, May 25, 2010 at 7:40 AM, Peng Yu <pe...@gmail.com> wrote:
>>> It seems that I have to specify which file or files to commit. This
>>> will be a problem if I always simultaneously edit tens of files before
>>> I can do a commission. Is there an automatic way to figure out which
>>> files should be commit and commit them?

No. If you want Subversion to know you've renamed a file, you have to
tell Subversion. Subversion doesn't sit there and watch all of your
keystrokes, so it doesn't know if you modified a file's name.

If you use "svn mv" or "svn rename" instead of the operating system
command for renaming or moving a file, Subversion will know that
you've renamed a file, and will also show that change in your working
directory:

$ ls
foo     bar

$ svn mv foo fu

$ ls
fu     bar

So, if you need to rename a file, you just need to use the Subversion command.

-- 
David Weintraub
qazwart@gmail.com

Re: Automatic commission?

Posted by Peng Yu <pe...@gmail.com>.
On Mon, May 24, 2010 at 4:46 PM, Daniel Becroft <dj...@gmail.com> wrote:
> On Tue, May 25, 2010 at 7:40 AM, Peng Yu <pe...@gmail.com> wrote:
>> It seems that I have to specify which file or files to commit. This
>> will be a problem if I always simultaneously edit tens of files before
>> I can do a commission. Is there an automatic way to figure out which
>> files should be commit and commit them?
>
> You can not specify anything, and it will commit all changes (e.g. svn
> commit -m ....).
>
> See the book for an example:
> http://svnbook.red-bean.com/nightly/en/svn.tour.cycle.html#svn.tour.cycle.commit

If I rename the files locally without using svn command, then I commit
without any arguments. Will the command 'commit' be able to figure
about the file with new name is modified from the old file?

-- 
Regards,
Peng

Re: Automatic commission?

Posted by Daniel Becroft <dj...@gmail.com>.
On Tue, May 25, 2010 at 7:40 AM, Peng Yu <pe...@gmail.com> wrote:
> It seems that I have to specify which file or files to commit. This
> will be a problem if I always simultaneously edit tens of files before
> I can do a commission. Is there an automatic way to figure out which
> files should be commit and commit them?

You can not specify anything, and it will commit all changes (e.g. svn
commit -m ....).

See the book for an example:
http://svnbook.red-bean.com/nightly/en/svn.tour.cycle.html#svn.tour.cycle.commit

Cheers,
Daniel B.

Re: Automatic commission?

Posted by Les Mikesell <le...@gmail.com>.
On 5/24/2010 4:40 PM, Peng Yu wrote:
> It seems that I have to specify which file or files to commit. This
> will be a problem if I always simultaneously edit tens of files before
> I can do a commission. Is there an automatic way to figure out which
> files should be commit and commit them?

A commit with no file list should commit all changes in your current 
directory and below.

-- 
   Les Mikesell
    lesmikesell@gmail.com

Re: Automatic commission?

Posted by David Weintraub <qa...@gmail.com>.
When you do a "svn commit", it will automatically submit any files
that were changed.
On Mon, May 24, 2010 at 5:40 PM, Peng Yu <pe...@gmail.com> wrote:
> It seems that I have to specify which file or files to commit. This
> will be a problem if I always simultaneously edit tens of files before
> I can do a commission.

Subversion automatically commits all file changes if you don't specify
any particular files. So, if you edit 10 or so files, you can submit
them all with just a "svn commit". Subversion even searches the entire
directory tree for changes, so it will commit  change even if it is in
a sub-sub-sub-directory.

You only specify files if there is some reason you don't want to
commit all of the files you've changed. In newer versions of
Subversion, you can put files into change lists and then submit just a
particular change list.

-- 
David Weintraub
qazwart@gmail.com