Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: Committing different portions of a directory tree to different repositories

fsvs
Discussion topic

2020-03-13: This site is going to be decommissioned and shut down very soon. Please copy and archive any data you wish to keep ASAP

Hide all messages in topic

All messages in topic

Re: Committing different portions of a directory tree to different repositories

Author pmarek
Full name P.Marek
Date 2013-06-29 11:29:21 PDT
Message > # fsvs urls dump
> name:,prio:0,target:​HEAD,ro:0,svn+ssh://​svn.example.com/sys-​systemname
>
> I see a "name" attribute there. So maybe the unversion step could be
> written as (assuming that / is named "base"):
>
> # fsvs unversion name:base ./reports
>
> (I can't find where I ran across the concept that different working
> copies could have "names".)
Not _working copies_ have names, but URLs have.
Basically you can say "commit to base" vs. "commit to for-this-host" etc.

Re: Committing different portions of a directory tree to different repositories

Author Thomas Harold <thomas-lists at nybeta dot com>
Full name Thomas Harold <thomas-lists at nybeta dot com>
Date 2013-06-28 17:42:19 PDT
Message On 6/28/2013 1:58 PM, P.Marek wrote:
>> # cd /
>> # fsvs ignore ./reports
>> (works fine)
> And was that written into the correct "Ign" file?
>

Yes

>
>> # fsvs unversion ./reports
>> Using unversion on the working copy root doesn't make sense.
>>
>> How do I go about turning off the /reports URL being stored into the
>> primary repository?
> Hmmm, I guess the easiest way is to find out the MD5 hash of /reports (eg. via "fsvs
> info /reports"), and rename the config directory away.

That's basically the approach that I had to take. I killed off the
/etc/fsvs/md5-hash folder that matched /reports, then did the unversion,
then redid my urls command to relink /reports to the proper repository URL.

Moving it out of the way via rename, then moving it back would have
saved me some work (if I had a bunch of ignores).

> Or, it might work to "add" and "unversion" a different file in the same commandline, so
> that FSVS only finds / as common WC.

Or maybe a way to specific the "name" of the URL that I'm trying to work
with? When I look at:

# fsvs urls dump
name:,prio:0,target:​HEAD,ro:0,svn+ssh://​svn.example.com/sys-​systemname

I see a "name" attribute there. So maybe the unversion step could be
written as (assuming that / is named "base"):

# fsvs unversion name:base ./reports

(I can't find where I ran across the concept that different working
copies could have "names".)

Re: Committing different portions of a directory tree to different repositories

Author pmarek
Full name P.Marek
Date 2013-06-28 10:58:33 PDT
Message > # cd /
> # fsvs ignore ./reports
> (works fine)
And was that written into the correct "Ign" file?


> # fsvs unversion ./reports
> Using unversion on the working copy root doesn't make sense.
>
> How do I go about turning off the /reports URL being stored into the
> primary repository?
Hmmm, I guess the easiest way is to find out the MD5 hash of /reports (eg. via "fsvs
info /reports"), and rename the config directory away.

Or, it might work to "add" and "unversion" a different file in the same commandline, so
that FSVS only finds / as common WC.


Regards,

Phil

Re: Committing different portions of a directory tree to different repositories

Author Thomas Harold <thomas-lists at nybeta dot com>
Full name Thomas Harold <thomas-lists at nybeta dot com>
Date 2013-06-28 06:16:20 PDT
Message That being said, assuming that I've performed the following steps:

# cd /
# fsvs urls svn+ssh://svn.exampl​e.com/systemname
# fsvs ignore ./reports
(repeated fsvs ignore statements to ignore /proc, /sys, etc)
# fsvs ci -m 'initial commit' /etc
# fsvs ci -m 'initial commit' /usr/local
# fsvs status
(see if there is anything else that needs to be ignored)
# fsvs ci -m 'initial commit'
(which grabs the remainders)

Note: that /reports is initially written to the
svn+ssh://svn.exampl​e.com/systemname repository.

Then I did a different "fsvs urls" command for /reports

# cd /reports
# fsvs urls svn+ssh://svn.exampl​e.com/reports/system​name
# fsvs ci -m 'initial commit'

Now I want to stop putting /reports into the primary repository:

# cd /
# fsvs ignore ./reports
(works fine)
# fsvs unversion ./reports
Using unversion on the working copy root doesn't make sense.

How do I go about turning off the /reports URL being stored into the
primary repository?

Re: Committing different portions of a directory tree to different repositories

Author Thomas Harold <thomas-lists at nybeta dot com>
Full name Thomas Harold <thomas-lists at nybeta dot com>
Date 2013-06-27 22:36:26 PDT
Message On 6/28/2013 1:17 AM, P.Marek wrote:
>> I even tried fooling it, thinking that maybe it wanted its own
>> config/waa locations:
> No, that's no problem.
>
> How about doing a "fsvs up" before trying to commit? Then it should get the HEAD
> revision number, and all should (/might) be fine.
>

Found the error, the repository had the following permissions:

chmod -R 775 /var/svn/repo-name
chmod -R g+s /var/svn/repo-name
chown -R root /var/svn/repo-name
chgrp -R groupname /var/svn/repo-name

The problem was that the groupname was wrong, so the account that was
trying to write to the svn+ssh: URL was unable to do so. But FSVS is
giving a strange error when it can't write to the repo over svn+ssh, so
it was misleading as to what the real problem was.

(I had a typo in the script that sets permissions on the various repos.
  So the groupname that I thought was being applied, was not.)

Re: Committing different portions of a directory tree to different repositories

Author pmarek
Full name P.Marek
Date 2013-06-27 22:17:46 PDT
Message > I even tried fooling it, thinking that maybe it wanted its own
> config/waa locations:
No, that's no problem.

How about doing a "fsvs up" before trying to commit? Then it should get the HEAD
revision number, and all should (/might) be fine.


Regards,

Phil

Re: Committing different portions of a directory tree to different repositories

Author Thomas Harold <thomas-lists at nybeta dot com>
Full name Thomas Harold <thomas-lists at nybeta dot com>
Date 2013-06-26 08:15:01 PDT
Message I even tried fooling it, thinking that maybe it wanted its own
config/waa locations:

#!/bin/sh
# Only executes FSVS if FSVS reports outstanding changes

FSVS_CONF=~/.fsvs-conf-reports
FSVS_WAA=~/.fsvs-waa-reports
export FSVS_CONF FSVS_WAA

cd /reports

FCOUNT=`/usr/local/bin/fsvs | /bin/grep -v 'dir.*\.$' | /usr/bin/wc -l`

if [ $FCOUNT -gt 0 ] ; then
     /usr/local/bin/fsvs sync-repos
     /usr/local/bin/fsvs -d -o verbose=all ci -m "Automatic FSVS snapshot"
else
     echo "Nothing changed"
fi

The tail end of this dies with:

11:13:48.655 waa__mkdir_mask[waa.c:360]
/root/.fsvs-waa-repo​rts/70/ac/904afcf063​8af8653b72fd93c109: last is 1
11:13:48.655 waa__get_waa_directo​ry[waa.c:537] returning
/root/.fsvs-waa-repo​rts/70/ac/904afcf063​8af8653b72fd93c109/
11:13:48.701 hsh__close[hash_ops.c:347] nothing found, removing
/root/.fsvs-waa-repo​rts/70/ac/904afcf063​8af8653b72fd93c109/p​rop
11:13:48.701 waa__delete_byext[waa.c:855] unlink
/root/.fsvs-waa-repo​rts/70/ac/904afcf063​8af8653b72fd93c109/p​rop
11:13:48.701 waa__delete_byext[waa.c:880] last removed was
/root/.fsvs-waa-reports/70
11:13:48.701 hsh__close[hash_ops.c:359] closing hash
11:13:48.763 ci__nondir[commit.c:461] lvm_vgscan: status new, owner,
group, mtime, umode; flags none
11:13:48.763 ci__nondir[commit.c:544] really sending ...
11:13:48.764 ci__nondir[commit.c:558] after sending encoder=(nil)
11:13:48.764 ci__directory[commit.c:879] setting URL of
./configuration/lvm_vgscan
11:13:48.764 ci__directory[commit.c:685] ./configuration/lvm_lvscan:
action (new), updated mode 0100644, flags 0, filter 1
11:13:48.764 ops__build_path[est_ops.c:717] 0x7e7200 found in cache
index 44; lru 44
11:13:48.764 st__print_status[status.c:187] VERBOSITY=-1
11:13:48.764 hlp__format_path[helper.c:1622] parent=., has ; len=0,
rel_len=25
N..... 272 (none) configuration/lvm_lvscan (none)
11:13:48.764 hlp__lstat[helper.c:354] ./configuration/lvm_lvscan: uid=0
gid=0 mode=0100644 dev=0x90c ino=1048584 rdev=0x0 size=272
11:13:48.764 ci__directory[commit.c:759] set st for lvm_lvscan
11:13:48.764 ci__directory[commit.c:801] new lvm_lvscan (parent 0x7e7ef8)
11:13:48.764 ci__directory[commit.c:826] adding
./configuration/lvm_lvscan with (null):-1
11:13:48.764 ci__directory[commit.c:841] baton for new lvm_lvscan
0x7ea0c0 (parent 0x7e7ef8)
11:13:48.764 ci__directory[commit.c:854] doing changes, flags=0
11:13:48.764 ops__build_path[est_ops.c:717] 0x7e7200 found in cache
index 44; lru 44
11:13:48.764 ops__build_path[est_ops.c:717] 0x7e7200 found in cache
index 44; lru 44
11:13:48.764 waa___get_path_md5[waa.c:393] path is
./configuration/lvm_lvscan
11:13:48.764 Increment[helper.c:476] adding /reports
11:13:48.764 Increment[helper.c:476] adding /
11:13:48.764 Increment[helper.c:476] adding ./configuration/lvm_lvscan
11:13:48.764 hlp__pathcopy[helper.c:579] finished path is
/reports/configurati​on/lvm_lvscan
11:13:48.764 waa___get_path_md5[waa.c:432] md5 of
/reports/configurati​on/lvm_lvscan
11:13:48.764 waa__mkdir_mask[waa.c:360] /root/.fsvs-waa-reports/6a: last
is 1
11:13:48.764 waa__mkdir_mask[waa.c:360] /root/.fsvs-waa-reports/6a/b9:
last is 1
11:13:48.764 waa__mkdir_mask[waa.c:360]
/root/.fsvs-waa-repo​rts/6a/b9/eeffb1b5b3​c686cab1548b2960d2: last is 1
11:13:48.764 waa__get_waa_directo​ry[waa.c:537] returning
/root/.fsvs-waa-repo​rts/6a/b9/eeffb1b5b3​c686cab1548b2960d2/
11:13:48.796 hsh__close[hash_ops.c:347] nothing found, removing
/root/.fsvs-waa-repo​rts/6a/b9/eeffb1b5b3​c686cab1548b2960d2/p​rop
11:13:48.796 waa__delete_byext[waa.c:855] unlink
/root/.fsvs-waa-repo​rts/6a/b9/eeffb1b5b3​c686cab1548b2960d2/p​rop
11:13:48.796 waa__delete_byext[waa.c:880] last removed was
/root/.fsvs-waa-reports/6a
11:13:48.796 hsh__close[hash_ops.c:359] closing hash


An error occurred at 11:13:48.873: Device or resource busy (16)
   in ci___set_props [commit.c:397]: set meta-data
   in ci__nondir [commit.c:450]: ci___set_props: ci___set_props
   in ci__directory [commit.c:863]: ci__nondir: ci__nondir
   in ci__directory [commit.c:858]: ci__directory: ci__directory
   in ci___base_dirs [commit.c:1034]: ci__directory: ci__directory
   in ci__work [commit.c:1230]: ci___base_dirs: ci___base_dirs
   in ci__work [commit.c:1270]: ci___base_dirs
   in main [fsvs.c:1409]: action commit failed
11:13:48.873 main[fsvs.c:1426] memory stats: 0x7e4000 to 0x814000, 192 KB

# fsvs -V
FSVS (licensed under the GPLv3), (C) by Ph. Marek; version fsvs-1.2.5:2457

# svn --version
svn, version 1.7.9 (r1462340)
    compiled May 9 2013, 19:03:27

Re: Committing different portions of a directory tree to different repositories

Author Thomas Harold <thomas-lists at nybeta dot com>
Full name Thomas Harold <thomas-lists at nybeta dot com>
Date 2013-06-26 08:06:24 PDT
Message On 6/26/2013 10:37 AM, Philipp Marek wrote:
>
>> However, this dies with:
>>
>> An error occurred at 10:27:45.577: Device or resource busy (16)
>> in ci___set_props [commit.c:397]: set meta-data
>> in ci__nondir [commit.c:450]: ci___set_props: ci___set_props
>> in ci__directory [commit.c:863]: ci__nondir: ci__nondir
>> in ci__directory [commit.c:858]: ci__directory: ci__directory
>> in ci___base_dirs [commit.c:1034]: ci__directory: ci__directory
>> in ci__work [commit.c:1230]: ci___base_dirs: ci___base_dirs
>> in ci__work [commit.c:1270]: ci___base_dirs
>> in main [fsvs.c:1405]: action commit failed
> What version of subversion is that? And which FSVS?
>
>

Happens on two different boxes:

# fsvs -V
FSVS (licensed under the GPLv3), (C) by Ph. Marek; version fsvs-1.2.2:2424

# svn --version
svn, version 1.6.13 (r1002816)
    compiled Oct 2 2010, 20:48:38

Second box:

# fsvs -V
FSVS (licensed under the GPLv3), (C) by Ph. Marek; version fsvs-1.2.5:2457

# svn --version
svn, version 1.7.9 (r1462340)
    compiled May 9 2013, 19:03:27

On the server-side:

# svn --version
svn, version 1.7.10 (r1485443)
    compiled Jun 10 2013, 08:03:01

Re: Committing different portions of a directory tree to different repositories

Author pmarek
Full name P.Marek
Date 2013-06-26 07:37:39 PDT
Message > However, this dies with:
>
> An error occurred at 10:27:45.577: Device or resource busy (16)
> in ci___set_props [commit.c:397]: set meta-data
> in ci__nondir [commit.c:450]: ci___set_props: ci___set_props
> in ci__directory [commit.c:863]: ci__nondir: ci__nondir
> in ci__directory [commit.c:858]: ci__directory: ci__directory
> in ci___base_dirs [commit.c:1034]: ci__directory: ci__directory
> in ci__work [commit.c:1230]: ci___base_dirs: ci___base_dirs
> in ci__work [commit.c:1270]: ci___base_dirs
> in main [fsvs.c:1405]: action commit failed
What version of subversion is that? And which FSVS?

Committing different portions of a directory tree to different repositories

Author Thomas Harold <thomas-lists at nybeta dot com>
Full name Thomas Harold <thomas-lists at nybeta dot com>
Date 2013-06-26 07:34:26 PDT
Message Let's assume that I have the following directory structure (for brevity,
many have been omitted):

/
/etc
/reports
/reports/configuration
/usr
/usr/local
/var

I want to send /etc, /usr/local to the root of repository A. I want to
send /reports to a sub-directory in repository B.

Normally, for repository A I would do:

# cd /
# fsvs urls svn+ssh://svn.exampl​e.com/systemname
# fsvs ignore ./reports
(repeated fsvs ignore statements to ignore /proc, /sys, etc)
# fsvs ci -m 'initial commit' /etc
# fsvs ci -m 'initial commit' /usr/local
# fsvs status
(see if there is anything else that needs to be ignored)
# fsvs ci -m 'initial commit'
(which grabs the remainers)

My first guess on how to setup repository B would be:

# cd /reports
# fsvs urls svn+ssh://svn.exampl​e.com/reports/system​name

Then to commit it:

# cd /reports
# fsvs ci -m 'initial commit'

However, this dies with:

An error occurred at 10:27:45.577: Device or resource busy (16)
   in ci___set_props [commit.c:397]: set meta-data
   in ci__nondir [commit.c:450]: ci___set_props: ci___set_props
   in ci__directory [commit.c:863]: ci__nondir: ci__nondir
   in ci__directory [commit.c:858]: ci__directory: ci__directory
   in ci___base_dirs [commit.c:1034]: ci__directory: ci__directory
   in ci__work [commit.c:1230]: ci___base_dirs: ci___base_dirs
   in ci__work [commit.c:1270]: ci___base_dirs
   in main [fsvs.c:1405]: action commit failed
Messages per page: