[RFC] Branching from a repository directly

Goffredo Baroncelli kreijack at tiscalinet.it
Fri Feb 1 18:54:16 GMT 2008


Hi all,

may be useful the idea of branching from a repository directly?

The idea comes from the following observation: even tough a revision-id is not 
in a branch, but it is in the repository, we still can branch from that 
revision:

repo$ # the revid pqm at pqm.ubuntu.com-20071217013555-flkks94iql59tk5a is not
repo$ # in the branch bzr.dev. But it is in the repository
repo$ bzr log -r revid:pqm at pqm.ubuntu.com-20071217013555-flkks94iql59tk5a  \
	--short --show-id bzr.dev
bzr: ERROR: exceptions.ValueError: list.index(x): x not in list
[...]

repo$ # even tough the revision is not in the branch, we can branch from it !!
repo$ bzr branch -r revid:pqm at pqm.ubuntu.com-20071217013555-flkks94iql59tk5a \
	 bzr.dev bzr.dev-1.0
repo$ bzr log -r revid:pqm at pqm.ubuntu.com-20071217013555-flkks94iql59tk5a \
	 --short --show-id bzr.dev-1.0
 3062 Canonical.com Patch Queue Manager 2007-12-17 [merge]
      revision-id:pqm at pqm.ubuntu.com-20071217013555-flkks94iql59tk5a
      Prepare 1.0final


In general for every read-only operation that doesn't require a WT, *if we 
provide a revision-id* we can operate directly from the repository.

I think that the following commands may work on the repository:

- ls
- cat
- branch 
- diff (between two revid)
- log
- annotate
- testament
[...]


Toughs ?

BR
Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) 
<kreijack at inwind_DOT_it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9



More information about the bazaar mailing list