Rob Browning <
r...@defaultvalue.org> writes:
> Greg Troxel <
g...@lexort.com> writes:
>
>> file with two // is malformed, and sounds like an interpretation bug.
>
> Hmm, I thought I'd checked fairly carefully, and I currently believe
> that's syntactically valid.
I just in firefox went to
file://home/gdt/.bash_aliases
and it ends up at
file:///gdt/.bash_aliases
which is not found. I believe URLs have a host-type semantics field
after the // before the next /, and that for file: that must be empty
(or is ignored) and thus three /.
I just read that, and it says that remote uses a URL or user@host:path,
with a restriction to ssh and and bup. It then says that file: is a
legit URL, but it's unclear when you'd use it, and to me -- why it's not
ok to use with remote. That's because to me, -r means "the repo to save
to is {here}, not where it usually is" and the remote part is a detail.
BTW the bup: part is confusing because "existing bup server" presumes
that it's on some TCP port, probably, and nobody should do that. I
don't see how to start it, how to point to it, really anything other
than "don't do this anyway, so don't worry".
The file: URL section is confusing, because it blurs the 3 / that are
part of how you create a URL, and / that are part of pathnames. So
file:///b0/bup
is the bath "b0/bup" from the root of the current machine; the first two
// are part of the :// between scheme and authority, and the third /
separates the (empty) authority and the path. It feels like the man
page gives rules that amount to this, but that those rules are a
backconstruction rather then a definition.
>> I think it should be possible to specify a directory in the fileystem
>> (existing bup repo) to save to. Are you saying that's a wrong thing to
>> want to do?
>
> I'm not sure I follow. Are you wanting --remote to work for non-remote
> cases? And if the concern is your existing save command, could that
> just be:
>
> bup -d /b0/bup-PATH save --indexfile=/tmp/bup-PATH-host-FOO -n host-FOO \
> /home/gdt/path/to/FOO
The problem is that this is saying "use that place as BUP_DIR" and then
attempting to cause every known use of putting things in BUP_DIR to put
them someplace else. I really want the place-to-save-to to behave
semantically like a remote, where the config is read for hashsplit,
packs are written, refs updated, and really nothing else. No
index-cache, no index files, and no the other thing I don't know about,
now, or that gets added later.
I think what I'm asking for is for the sub-part of -d that selects the
saving-to repo to be activated, and not any other parts. -r used to do
that, even if it did bup w/o ssh.
I'm not understanding the semantics/purpose for -r being remote as part
of the essence of its being. Stepping back from syntax and how it's
organized, bup can save to a repo in the filesystems, or it can talk to
bup server. When it's talking to a bup server it fetches idx/mix, and
when it's saving directly it doesn't.
I'd be mostly fine with --local-repo /path/to repo, but for scripting,
it's awkward to switch commandline switches because the repo arg is
different. I'd be totally fine with file:///path/to as a remote, too,
if it meant "use it as if it were BUP_DIR, but for saving, not for the
other N things bupdir is for", and especially if that avoided copies of
idx files.
Probably, we're almost to the point of seprating things, and perhaps
that would bring cleanliness.
With index-cache, I could see erroring out if it's in BUP_DIR, and
make people reorg/clean. That's the rip-the-bandaid off approach, but
I tend to prefer that.
With the index, I'd also want that someplace else. Even if we use
~/.bup-local by default, and there's a different BUP_DIR_LOCAL for
that vs BUP_DIR
Maybe the thing is to have two BUP_DIRs conceptually, the working
BUP_DIR and the writing BUP_DIR. But this feels like it ends up with
--remote and file URLS for local repos, that are turned into a
"BUP_DIR" is set.
Maybe I'm the only one not happy about this and of course you shouldn't
feel pressured to do things on my account, if I haven't convinced you
that things aren't right.