why my process open .svn/tmp/svn-XXXXXX file? and why are tmp files deleted? and why my process can't open the right file after tmp files deleted?

2017-12-21 Thread Keva-Slient
we use svn managing our config files.


we lock config file when do committing or writing operation.
in client side, only commit operation executes. and svndump in server.


our process is always opening file like repo/someconfig/files . it's strang 
process opened tmp file like repo/.svn/tmp/svn-XX in some clients.  


and tmp file was deleted. our process report errors.


for example:
<8> Sundray-WAC / #lsof |grep online_assist | grep config |sort -k 3
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-39HEsA (deleted)
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-sTknMU (deleted)
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-ynboPV (deleted)






 



--
.
 Vanity...My favourite sin.
 --<>

Re: svnlook tree seems to disregard revision...

2017-12-21 Thread Johan Corveleyn
On Fri, Dec 22, 2017 at 12:34 AM, Bo Berglund  wrote:
> I am trying to understand how to use svnlook so I am testing it on the
> command line on my Win7 PC.
> Look at this:
>
> D:\>C:\Programs\Subversion\svnlook tree -r 773 D:\SVN\bosse
> XMLTV/trunk/ --show-ids --full-paths
> XMLTV/trunk/ <5-729.0.r773/27>
> XMLTV/trunk/ConfigXMLTV2Mei.dof <2-735.0.r766/31>
> XMLTV/trunk/ConfigXMLTV2Mei.dpr <5-735.0.r735/17>
> XMLTV/trunk/ConfigXMLTV2Mei.exe <7-735.0.r766/32>
> XMLTV/trunk/ConfigXMLTV2Mei.res <9-735.0.r766/33>
> XMLTV/trunk/Data/ <2-730.0.r745/4>
> XMLTV/trunk/Data/Boxer_TV_Access_LCN.html <4-730.0.r730/23>
> XMLTV/trunk/Data/GetEPG.bat <7-730.0.r730/24>
>
> Notice that files are listed that do not belong to r773, in fact it
> seems not to matter at all which revision number I use, the output
> stays the same. Only the first line seems to be associated to r773
>
> Is this a bug or is the documentation wrong (SvnBook 1.7)?
> It says on page 372:
>
> This shows the tree output for revision 13 in our sample repository:
> $ svnlook tree -r 13 /var/svn/repos
>
> What gives here?
> I expected *only* to see the files changed by r773.

'svnlook tree'  shows you the entire tree precisely as it is in r773.
In Subversion, every revision is like a new snapshot of the entire
repository tree. With 'svnlook tree' you can see (part of) that tree,
as it existed in that particular revision.

If you want to see the items that were changed in r773 you have to use
'svnlook changed'

[[[
$ svnlook help changed
changed: usage: svnlook changed REPOS_PATH

Print the paths that were changed.

Valid options:
  -r [--revision] ARG  : specify revision number ARG
  -t [--transaction] ARG   : specify transaction name ARG
  --copy-info  : show details for copies
]]]

-- 
Johan


svnlook tree seems to disregard revision...

2017-12-21 Thread Bo Berglund
I am trying to understand how to use svnlook so I am testing it on the
command line on my Win7 PC.
Look at this:

D:\>C:\Programs\Subversion\svnlook tree -r 773 D:\SVN\bosse
XMLTV/trunk/ --show-ids --full-paths
XMLTV/trunk/ <5-729.0.r773/27>
XMLTV/trunk/ConfigXMLTV2Mei.dof <2-735.0.r766/31>
XMLTV/trunk/ConfigXMLTV2Mei.dpr <5-735.0.r735/17>
XMLTV/trunk/ConfigXMLTV2Mei.exe <7-735.0.r766/32>
XMLTV/trunk/ConfigXMLTV2Mei.res <9-735.0.r766/33>
XMLTV/trunk/Data/ <2-730.0.r745/4>
XMLTV/trunk/Data/Boxer_TV_Access_LCN.html <4-730.0.r730/23>
XMLTV/trunk/Data/GetEPG.bat <7-730.0.r730/24>

Notice that files are listed that do not belong to r773, in fact it
seems not to matter at all which revision number I use, the output
stays the same. Only the first line seems to be associated to r773

Is this a bug or is the documentation wrong (SvnBook 1.7)?
It says on page 372:

This shows the tree output for revision 13 in our sample repository:
$ svnlook tree -r 13 /var/svn/repos

What gives here?
I expected *only* to see the files changed by r773.


-- 
Bo Berglund
Developer in Sweden



Re: Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Anton Shepelev
I wrote to Daniel Widenfalk:

>>>I  find  it mildly annoying to type the full path
>>>within a repository for server-side  file  opera-
>>>tions,  such  as  'delete'  and  'copy'.  Observe
>>>that, being on Windows, I must use quotes in  or-
>>>der to escape the caret character:
>>>
>>>   svn rm "^/A/B/C/file.txt"
>>>
>>>Is  there  a  way  to avoid the entry of the full
>>>path when invoking this command from A/B/C/ in  a
>>>working  copy?   In other words, I should like to
>>>have some syntax that told SVN to  use  the  full
>>>sever-side  path  of a file using the current di-
>>>rectory within a working copy.  For example,  in-
>>>stead of writing:
>>>
>>>   svn rm "^/A/B/C/file.txt"
>>>
>>>I could:
>>>
>>>   cd Work/A/B/C
>>>   svn rm "^^file.txt"
>>
>>Could  you  explain why you'd want to do a server-
>>side operation on something which is  locally  ac-
>>cessible?  I.e. why not do?
>>
>>$ cd A/B/C
>>$ svn rm file.txt
>>$ svn commit -m "Another fancy message"
>
>To  save  time and HDD load, easier to simplify the
>use of server-side 'svn info' e.g. to view lock in-
>formation,  'svn ls' kind of does it already...

I think it would be a natural extension of the caren
syntax.

-- 
Please, do not forward replies to the list to my e-mail.



Re: Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Bo Berglund
On Thu, 21 Dec 2017 14:14:23 +0100, Branko ?ibej 
wrote:

>> doesn't this work:
>> cd Work/A/B/C
>> svn rm file.txt
>>

>That is a local operation and you have to 'svn commit' to make it
>visible in the repository.
>
>What the OP describes is an operation that directly affects the
>repository, not the working copy.

You are right, also in CVS there are two operations, one for he delete
and one for the commit. None of them needs any extra path to them.
Good, then they work similarly...


-- 
Bo Berglund
Developer in Sweden



Re: Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Anton Shepelev
Daniel Widenfalk to Anton Shepelev:

>>I  find  it  mildly annoying to type the full path
>>within a repository for  server-side  file  opera-
>>tions, such as 'delete' and 'copy'.  Observe that,
>>being on Windows, I must use quotes  in  order  to
>>escape the caret character:
>>
>>   svn rm "^/A/B/C/file.txt"
>>
>>Is there a way to avoid the entry of the full path
>>when invoking this command from A/B/C/ in a  work-
>>ing  copy?   In other words, I should like to have
>>some syntax that told SVN to use the  full  sever-
>>side  path  of  a file using the current directory
>>within a working copy.  For  example,  instead  of
>>writing:
>>
>>   svn rm "^/A/B/C/file.txt"
>>
>>I could:
>>
>>   cd Work/A/B/C
>>   svn rm "^^file.txt"
>
>On  Windows  you'd use a double-carret to quote it,
>i.e:
>
>$ svn rm -m "fancy message goes here" ^^/A/B/C/file.txt

Thank you.

>Could you explain why you'd want to  do  a  server-
>side operation on something which is locally acces-
>sible?  I.e. why not do?
>
>$ cd A/B/C
>$ svn rm file.txt
>$ svn commit -m "Another fancy message"

To save time and HDD load, easier  to  simplify  the
use  of server-side 'svn info' e.g. to view lock in-
formation,  'svn ls' kind of does it already...

-- 
Please, do not forward replies to the list to my e-mail.



Re: Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Daniel Widenfalk
On 2017-12-21 12:57, Anton Shepelev wrote:
> Hello, all
> 
> I  find  it  mildly  annoying  to type the full path
> within a repository for server-side file operations,
> such as 'delete' and 'copy'.  Observe that, being on
> Windows, I must use quotes in order  to  escape  the
> caret character:
> 
>svn rm "^/A/B/C/file.txt"
> 
> Is  there  a way to avoid the entry of the full path
> when invoking this command from A/B/C/ in a  working
> copy?   In  other  words, I should like to have some
> syntax that told SVN to use the full sever-side path
> of a file using the current directory within a work-
> ing copy.  For example, instead of writing:
> 
>svn rm "^/A/B/C/file.txt"
> 
> I could:
> 
>cd Work/A/B/C
>svn rm "^^file.txt"

Hi,

On Windows you'd use a double-carret to quote it, i.e:

$ svn rm -m "fancy message goes here" ^^/A/B/C/file.txt

Could you explain why you'd want to do a server-side operation
on something which is locally accessible? I.e. why not do?

$ cd A/B/C
$ svn rm file.txt
$ svn commit -m "Another fancy message"

/D

-- 
 |\  _,,,---,,_
  ZZZzz /,`.-'`'-.  ;-;;,_
   |,4-  ) )-,_. ,\ (  `'-'
-'---''(_/--'--`-'\_)-



Re: Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Branko Čibej
On 21.12.2017 13:40, Bo Berglund wrote:
> On Thu, 21 Dec 2017 14:57:34 +0300, Anton Shepelev
>  wrote:
>
>> I could:
>>
>>   cd Work/A/B/C
>>   svn rm "^^file.txt"
>>
> doesn't this work:
> cd Work/A/B/C
> svn rm file.txt
>
> I am completely new to svn and I have no place to test this, but it
> seems natural to do it like this sive subversion surely knows where
> you are when issuing tha command
> (Came from CVS, where this is a natural way of commanding file
> operations)

That is a local operation and you have to 'svn commit' to make it
visible in the repository.

What the OP describes is an operation that directly affects the
repository, not the working copy.

-- Brane


Re: Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Bo Berglund
On Thu, 21 Dec 2017 14:57:34 +0300, Anton Shepelev
 wrote:

>I could:
>
>   cd Work/A/B/C
>   svn rm "^^file.txt"
>

doesn't this work:
cd Work/A/B/C
svn rm file.txt

I am completely new to svn and I have no place to test this, but it
seems natural to do it like this sive subversion surely knows where
you are when issuing tha command
(Came from CVS, where this is a natural way of commanding file
operations)


-- 
Bo Berglund
Developer in Sweden



Deduce the server URL from the current directory inside the working copy

2017-12-21 Thread Anton Shepelev
Hello, all

I  find  it  mildly  annoying  to type the full path
within a repository for server-side file operations,
such as 'delete' and 'copy'.  Observe that, being on
Windows, I must use quotes in order  to  escape  the
caret character:

   svn rm "^/A/B/C/file.txt"

Is  there  a way to avoid the entry of the full path
when invoking this command from A/B/C/ in a  working
copy?   In  other  words, I should like to have some
syntax that told SVN to use the full sever-side path
of a file using the current directory within a work-
ing copy.  For example, instead of writing:

   svn rm "^/A/B/C/file.txt"

I could:

   cd Work/A/B/C
   svn rm "^^file.txt"

-- 
Please, do not forward replies to the list to my e-mail.



RE: when will file ./svn/tmp/svn-XXXXXX be created? and why?

2017-12-21 Thread Bert Huijben
In many cases Subversion will create files there, then write its contents and 
when done move the file to the required location in your working copy. This 
makes sure that you will never see half written files during operations… and by 
that loose valuable information.

 

  Bert

 

From: Keva-Slient [mailto:356730...@qq.com] 
Sent: donderdag 21 december 2017 08:29
To: users ; 王运 <694591...@qq.com>; bluecat 
<690853...@qq.com>
Subject: when will file ./svn/tmp/svn-XX be created? and why?

 

 

we use svn managing our config files. 

 

in client side environment, check out repos in client side, processes could 
open the config file and read or write the config file. some of them could keep 
file handler for a long time.

 

now we get some problems:  the config file will be moved to .svn/tmp directory 
and be deleted. 

 

for example: online_assist process:

online_assist will open some config files in /wns/etc/config/ directory. 
/wns/etc/config/ is a repo.

use losf to see which files online_assist are opening.

 

#lsof |grep online_assist |grep .svn/tmp

704  /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-ynboPV (deleted)

704  /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-sTknMU (deleted)

704  /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-39HEsA (deleted)

 

online_assist should open config files which are not in .svn/tmp directory.

in usual, online_assist should open config files like : 
/wns/etc/config/db/ap_data.db ...

 

#pidof online_assist

704

#ls -l /proc/704/fd/* -l |grep config |sort -k 10

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/19 -> 
/wns/etc/config/.svn/tmp/svn-39HEsA (deleted)

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/18 -> 
/wns/etc/config/.svn/tmp/svn-sTknMU (deleted)

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/15 -> 
/wns/etc/config/.svn/tmp/svn-ynboPV (deleted)

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/23 -> 
/wns/etc/config/db/china_province_city.db

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/20 -> 
/wns/etc/config/db/phonelocation.db

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/16 -> 
/wns/etc/config/wac/data/ouiol.db

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/21 -> 
/wns/etc/config/wac/data/ouiol.db

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/17 -> 
/wns/etc/config/wac/data/sta_login_stat.db

lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/22 -> 
/wns/etc/config/wac/data/wti.db

 

some files opened by online_assist in  /wns/etc/config are correct, like 
/wns/etc/config/wac/data/ouiol.db. but some are moved to 
/wns/etc/config/.svn/tmp and deleted.

 

why is this ?

 

why would the file opend by process be moved to .svn/tmp

and

why would the file moved to .svn/tmp be deleted?

 

 

--

.

Vanity...My favourite sin.

--<>

 



when will file ./svn/tmp/svn-XXXXXX be created? and why?

2017-12-21 Thread Keva-Slient
we use svn managing our config files. 


in client side environment, check out repos in client side, processes could 
open the config file and read or write the config file. some of them could keep 
file handler for a long time.


now we get some problems:  the config file will be moved to .svn/tmp directory 
and be deleted. 


for example: online_assist process:
online_assist will open some config files in /wns/etc/config/ directory. 
/wns/etc/config/ is a repo.
use losf to see which files online_assist are opening.


#lsof |grep online_assist |grep .svn/tmp
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-ynboPV (deleted)
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-sTknMU (deleted)
704 /wns/sbin/online_assist /wns/etc/config/.svn/tmp/svn-39HEsA (deleted)


online_assist should open config files which are not in .svn/tmp directory.

in usual, online_assist should open config files like : 
/wns/etc/config/db/ap_data.db ...


#pidof online_assist
704

#ls -l /proc/704/fd/* -l |grep config |sort -k 10
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/19 -> 
/wns/etc/config/.svn/tmp/svn-39HEsA (deleted)
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/18 -> 
/wns/etc/config/.svn/tmp/svn-sTknMU (deleted)
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/15 -> 
/wns/etc/config/.svn/tmp/svn-ynboPV (deleted)
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/23 -> 
/wns/etc/config/db/china_province_city.db
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/20 -> 
/wns/etc/config/db/phonelocation.db
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/16 -> 
/wns/etc/config/wac/data/ouiol.db
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/21 -> 
/wns/etc/config/wac/data/ouiol.db
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/17 -> 
/wns/etc/config/wac/data/sta_login_stat.db
lrwx-- 1 root root 64 Dec 20 08:22 /proc/704/fd/22 -> 
/wns/etc/config/wac/data/wti.db




some files opened by online_assist in  /wns/etc/config are correct, like 
/wns/etc/config/wac/data/ouiol.db. but some are moved to 
/wns/etc/config/.svn/tmp and deleted.


why is this ?


why would the file opend by process be moved to .svn/tmp
and
why would the file moved to .svn/tmp be deleted?




--
.
 Vanity...My favourite sin.
 --<>