Commit Graph

1008 Commits

Author SHA1 Message Date
Nicolas Dumazet
064d677bd7 filectx: use cmp(self, fctx) instead of cmp(self, text)
This allows more flexibility in implementation, and in particular,
lets the context decide if revision text has to be loaded or not.
2010-07-27 23:40:46 +09:00
Nicolas Dumazet
055002dd11 localrepo: refactor filter computation
Separate loading part from access part to be able to tell with:
  repo._loadfilter(name)
  bool(name in repo.filterpats)
if there is a 'name' filter available.
2010-07-24 00:28:20 +09:00
Nicolas Dumazet
02750015e0 localrepo.status: move fixup concatenation inside if block for clarity
clean += fixup only makes sense if fixup is not empty; it should
be inside the "if fixup" test.
2010-07-25 10:05:38 +09:00
Benoit Boissinot
68e9051490 changegroup*(): use enumerate when possible 2010-07-24 00:15:29 +02:00
Benoit Boissinot
e8a7ae7259 changegroupsubset(): with the fix, prune() is actually useful in the testsuite 2010-07-24 00:03:19 +02:00
Benoit Boissinot
fc9a4ead97 changegroupsubset: simplify knownheads/has_cl_set computation 2010-07-23 00:04:18 +02:00
Benoit Boissinot
3914cfbfcd changegroupsubset(): ancestors() is not inclusive, we need to remove the "heads" 2010-07-22 23:54:57 +02:00
Benoit Boissinot
6fc1d6e96b changegroupsubset(): move comment at the right place 2010-07-22 23:44:14 +02:00
Benoit Boissinot
fec5f7c3d8 changegroupsubset(): refactor the prune() functions 2010-07-22 23:13:03 +02:00
Peter Arrenbrecht
8f2d068a05 discovery: avoid discovery when local graph is a subset of remote
Immediately sends local's heads to the server to check whether the server knows them all.
If it does, we can call getbundle immediately.

Interesting test output changes are:

-  added 1 changesets with 0 changes to 1 files (+1 heads)
+  added 1 changesets with 0 changes to 0 files (+1 heads)

-> The new getbundle() actually fixes a bug vs. changegroupsubset() in that it no longer
returns unnecessary files when file revs are reused.

warning: repository is unrelated
+  requesting all changes

-> The new use of common instead of bases correctly indicates that an unrelated pull
gets all changes from the server.
2011-03-23 16:06:55 +01:00
Peter Arrenbrecht
6646f48826 wireproto: add getbundle() function
getbundle(common, heads) -> bundle

Returns the changegroup for all ancestors of heads which are not ancestors of common. For both
sets, the heads are included in the set.

Intended to eventually supercede changegroupsubset and changegroup. Uses heads of common region
to exclude unwanted changesets instead of bases of desired region, which is more useful and
easier to implement.

Designed to be extensible with new optional arguments (which will have to be guarded by
corresponding capabilities).
2011-03-23 16:02:11 +01:00
Peter Arrenbrecht
d542bac8c7 wireproto: add known([id]) function
known([Node]) -> [1/0]

Returns 1/0 for each node, indicating whether it's known by the server.
Needed for new discovery protocols introduced in later patches.
2011-03-22 09:22:21 +01:00
Peter Arrenbrecht
375ab88b9f debug: add debugwireargs to test argument passing over the wire
Tests argument passing locally, via HTTP, and via SSH. This is mainly preparation
for the next patch.
2011-03-22 07:38:32 +01:00
Matt Mackall
8a1d106a60 changegroup: minor cleanups 2011-03-20 20:25:41 -05:00
Matt Mackall
5468a6deab changegroup: fix leftover from delta read 2011-03-20 20:17:57 -05:00
Matt Mackall
6c9dcf752e changegroup: drop expensive redundant usage of readdelta for progress 2011-03-20 20:16:51 -05:00
Matt Mackall
d4b4c17c11 changegroupsubset: use manifest.readfast to simplify collector 2011-03-20 19:43:28 -05:00
Matt Mackall
3e746ce14e changegroupsubset: simplify filenode_collector 2011-03-20 19:43:28 -05:00
Matt Mackall
91e167ab79 changegroupsubset: more renaming 2011-03-20 19:43:28 -05:00
Matt Mackall
bd3182c8ff changegroupsubset: simplify prune
Ancestors of nodes linked to commonrevs can be expected to be linked
to commonrevs. Walking graphs of each revlog looking for rare/nonexistent outliers is overkill.
2011-03-20 19:43:28 -05:00
Matt Mackall
f97f8563d2 changegroupsubset: more minor cleanups
- remove more excessive comments
 - simplify some sorting operations
 - rename some variables
 - replace identity with a lambda
2011-03-20 19:43:28 -05:00
Matt Mackall
4e33ba22d8 changegroupsubset: minor cleanups
- move some variable declarations
 - drop some excessive comments
 - use standard variable naming
2011-03-20 19:43:28 -05:00
Benoit Boissinot
5d27fc0ccb changegroupsubset: extranodes are no longer needed 2011-03-20 01:16:57 +01:00
David Soria Parra
848c5155b1 localrepo: do not update bookmarks in addchangegroup
We want to update the current bookmark to the most recent revision on
current branch unless there is a remote bookmark that points to
a different descendant. Addchangegroup is called before we can check for
remote bookmarks.

We don't update the bookmark in addchangegroup anymore to allow proper updating
of bookmarks in pull.
2011-03-14 20:53:55 +01:00
David Soria Parra
4e5087c547 bookmarks: separate bookmarks update code from localrepo's pull.
We explicitly want to update bookmarks from a remote. This will avoid
duplicate calls to listkeys if we clone (which calls pull) and keep
bookmark related code together.
2011-03-14 00:10:43 +01:00
Benoit Boissinot
c7e7cca544 changegroupsubset(): change variable names, simplify lookup logic 2010-07-22 16:51:45 +02:00
Benoit Boissinot
d2d26a535b changegroup(): used "linkrev" instead of "revlink" 2010-07-22 16:18:33 +02:00
Benoit Boissinot
1c069d50bd fix comment 2010-07-22 15:32:26 +02:00
Benoit Boissinot
27026ab37f changegroup*(): use set instead of dict 2010-07-22 14:34:37 +02:00
Nicolas Dumazet
517eb64655 merge with stable 2010-07-22 15:14:22 +09:00
Mads Kiilerich
f9b5838b6f init: create target directory recursively
Subrepos with relative paths must often be cloned to locations deep in the
directory structure. This allows clone over ssh (init+push) work.
2010-07-21 19:29:57 +02:00
Benoit Boissinot
8e7a94f166 changegroupsubset: remove unneeded cast to list 2010-07-16 18:35:15 +02:00
Benoit Boissinot
b4d92505c7 localrepo: remove push_{unbundle,addchangegroup}(), factor it inside push() 2010-07-16 13:38:33 +02:00
Matt Mackall
5e9649ad3b commit: add missing _() 2010-07-01 11:22:56 -05:00
Matt Mackall
5e2b0ca2ab subrepo: refuse to commit subrepos if .hgsub is excluded (issue2232) 2010-07-01 11:20:13 -05:00
Matt Mackall
e4cf775b71 addchangegroup: pass in lock to release it before changegroup hook is called
Currently, callers of addchangegroup first acquire the repository
lock, usually to check that an unbundle request isn't racing. This
means that changegroup hook actions that might write to a repo get
stuck waiting for a lock. Here, we add a new optional lock parameter
and update all the callers. Post-1.6 we may make it non-optional.
2010-06-25 13:47:28 -05:00
Matt Mackall
ae48625c19 pushkey: add localrepo support 2010-06-16 16:04:46 -05:00
Dirkjan Ochtman
af6b696f0f move working dir/dirstate methods from localrepo to workingctx 2010-06-07 20:03:32 +02:00
Dirkjan Ochtman
cf1de649bd move discovery methods from localrepo into new discovery module 2010-06-07 18:35:54 +02:00
Ronny Pfannschmidt
4362059a98 make transactions work on non-refcounted python implementations 2010-05-27 17:47:40 +02:00
Matt Mackall
e9152b864c Merge with stable 2010-05-28 16:01:57 -05:00
Matt Mackall
26c38ffe0e status: avoid performance regression when no .hgsub is present
(introduced by 3067d5de9e6c)
2010-05-28 14:41:11 -05:00
Sune Foldager
f9f5488566 push: add --new-branch option to allow intial push of new branches
Compare this to --force which allows anything to be pushed. With --new-branch,
only changesets to named branches not present on the and changesets not
introducing additional heads on existing branches are allowed.

Developed by
  Henrik Stuart <henrik.stuart@edlund.dk>
  Sune Foldager <cryo@cyanite.org>
2010-05-21 15:22:29 +02:00
Matt Mackall
a02b5a5fd1 commands: initial audit of exit codes
bisect: clarify None return
bundle: return 1 on no changes
clone: return result code
copy: limit errors to 0/1
commit: return 1 on no changes
forget: return 1 on errors
grep: return 1 if no match found
remove: return 1 on errors
resolve: return 1 if something fails to resolve
rollback: return 1 if no rollback data
2010-05-15 17:48:49 -05:00
Matt Mackall
3d7e1368a3 rollback: fix off-by-one in message 2010-05-13 17:36:45 -05:00
Matt Mackall
eb7971b34e Merge with stable 2010-05-11 17:03:44 -05:00
Greg Ward
89bd117131 push: document return values between various repo methods.
This starts at localrepository.push() and seeps down to
push_addchangegroup(), push_unbundle(), prepush(), addchangegroup(),
and leaks out to sshrepository.unbundle(), sshrepository.addchangegroup(),
and httprepository.unbundle().  Seems to cover everything you ever
wanted to know about pushing but were afraid to ask.
2010-05-02 21:56:25 -04:00
Edouard Gomez
293b104156 subrepo: print paths relative to upper repo root for push/pull/commit
This makes more sense when using multiple levels of
nesting.

This happens to help a lot in a case where 3 projects
of mine all use the same makefile helper project as a
sub. A fourth project use these first three projects
and current output made it very hard to figure
which makefile helper was committed. it looked more
like the project was committed/pushed/pulled three times
in a row than dealing on three different repos.
2010-05-01 23:05:22 +02:00
Nicolas Dumazet
22fdcb45f3 tag: warn users about tag/branch possible name conflicts
As reported recently, Mercurial users can easily find confusion when
using a common name for a tag and a branch. It seems reasonable to warn
them about this potential outcome, to avoid that "surprise".
* Explain briefly the issue in "hg help tag"
* Warn when tagging a revision
2010-04-19 17:41:12 +09:00
Eric Eisner
dd5c303d3f tags: return tags in sorted order
This makes log and summary have less arbitrary tag ordering and also
groups similar tags together, such as the mq tags.
2010-04-26 15:58:36 -04:00
Benoit Boissinot
5fb4657cce localrepo.commit: use explicit variables, avoid creating new contexts 2010-04-21 01:34:12 +02:00
Benoit Boissinot
a6309b7596 context: remove parents parameter to workingctx
it was needed before the refactor of commit, workingctx always uses the
dirstate now.
2010-04-21 01:18:31 +02:00
Steve Losh
8551e0d0f2 commands: add more robust support for 'hg log -b' (issue2078)
Fixes issue2078 and adds tests to cover various 'hg log -b' uses.

This change adds a localrepo.lookupbranch(key, remote=None) function. This
will look up the branch of the revision with the given key. The algorithm
works like this:

    * If a remote repo is given and KEY is the name of a branch in that repo,
      return KEY.
    * If no remote repo is given and KEY is the name of a branch in the local
      repo object, return KEY.
    * Otherwise look up the revision with the identifier KEY in the local repo
      and return its branch.

This change also makes 'hg log -b' use this new functionality and adds a few
tests for it.
2010-04-12 19:33:25 -04:00
Sune Foldager
3a5dc74781 merge with stable 2010-04-15 22:34:26 +02:00
Sune Foldager
a81e6a76a5 prepush: rewrite most of the code from scratch
For servers with branchmap support, the algorithm now works as follows:

1. A list of branches in outgoing changesets is created.
2. Using the remote branchmap, a check for new branches is performed.
3. A map (from branch to head list) of locally known remote heads before
   the push is created, and one which, after step 4, will contain the locally
   known remote heads after the push.
4. The post-push head map is updated with the outgoing changesets, using the
   branch cache update mechanism.
5. A check for new heads is performed, by comparing the length of the head list
   before and after push, for each branch. If there are new heads, an error
   depending on whether or not there are incoming changes on the branch,
   is returned.
6. If the push is allowed, a warning is written if there are incoming changes
   on any branches involved in the push.

For old servers, an algorithm similar to step 4-6 above is used to check for
new topological heads only.

Two bugs are also fixed:
1. Sometimes you would be allowed to push new branch heads without --force.
   A test for this case was added.
2. You would get the "note: unsynced remote changes!" warning if there were any
   incoming changesets, even if they were on unrelated branches.
2010-04-15 21:59:21 +02:00
Sune Foldager
fac215850a localrepo: simplify _updatebranchcache slightly 2010-04-15 17:25:37 +02:00
Sune Foldager
f2631c6182 merge with stable 2010-04-14 19:49:06 +02:00
Sune Foldager
c7f5c787cc merge 2010-04-14 19:43:40 +02:00
Sune Foldager
0fd6b63c90 prepush: backed out refactoring
It has some problems in corner cases and will fail on a test recently
introduced on stable. Will maybe be reintroduced later, in a better
version.
2010-04-14 19:43:19 +02:00
Sune Foldager
62eb1177d6 prepush: fix bug in warning message selection
In certain situations you would be told "you should pull and merge" even when
there is nothing to pull.
2010-04-14 19:11:35 +02:00
Matt Mackall
32c96f5420 rollback: improve message 2010-04-12 17:21:30 -07:00
Matt Mackall
1e8a0f7c37 transaction: use newlines to separate description elements 2010-04-12 17:11:14 -07:00
Matt Mackall
4fff9367de progress: show approximate progress info for pull 2010-04-10 17:20:43 -05:00
Patrick Mezard
ec416a501a localrepo: do not store URL password in undo.desc 2010-04-12 21:37:21 +02:00
Steve Borho
8299cbf24b rollback: add dry-run argument, emit transaction description 2010-04-09 17:23:37 -05:00
Steve Borho
c7ec998a7b localrepo: add desc parameter to transaction
All callers to localrepo.transaction() must supply a transaction description.
The description and the existing repository tip are then stored
(transactionally) into .hg/undo.desc; where rollback can later find it.
2010-04-09 17:23:35 -05:00
Sune Foldager
b66624019c partial backout of 5a81f112887e and add tests (issue2131)
The tests are due to Peter Arrenbrecht
2010-04-08 19:46:47 +02:00
Peter Arrenbrecht
3ae78ab394 localrepo: refactor prepush logic
Simplifies the prepush check logic and makes it a lot more direct and
comprehensible. Instead of comparing the total local vs. remote head count, it
compares the number of new vs. removed heads.
2010-04-08 17:21:42 +02:00
Sune Foldager
bd6af17a91 merge with stable 2010-04-09 10:35:53 +02:00
Benoit Boissinot
3cebbf4916 merge with stable 2010-04-06 00:46:09 +02:00
Benoit Boissinot
679db973ed clone: no race possible, we can use changegroup() and have smaller urls
Related to issue2126
2010-04-06 00:45:53 +02:00
Sune Foldager
8d7f484a9b merge with stable 2010-03-26 17:09:56 +01:00
Sune Foldager
cd0e8d7662 push: refactor and optimize prepush 2010-03-26 17:02:49 +01:00
Sune Foldager
7acd5cb299 push: fix bug in prepush logic and its tests 2010-03-26 17:02:36 +01:00
Sune Foldager
7c4049acf8 localrepo: change _updatebranchcache to use a context generator 2010-03-26 17:02:23 +01:00
Martin Geisler
792e753cbc localrepo: more specific warning on adding large files
With better language as suggested by timeless.
2010-03-18 01:58:26 +01:00
Martin Geisler
9437379d1f Merge with stable 2010-03-18 01:59:53 +01:00
Matt Mackall
6e515e4e5d progress: drop extra args for pos=None calls (issue2087) 2010-03-17 18:15:16 -05:00
Martin Geisler
f3b2ed5d56 progress: use a verb (+noun) in present participle 2010-03-15 18:33:39 +01:00
Martin Geisler
7dc53bec4e Merge with stable 2010-03-15 18:36:11 +01:00
Benoit Boissinot
3db7df2869 style: use consistent variable names (*mod) with imports which would shadow 2010-03-11 17:43:44 +01:00
Benoit Boissinot
c967347014 strip: invalidate all caches after stripping (fixes issue1951)
test thanks to Stefano Tortarolo
2010-02-21 20:59:27 +01:00
Saint Germain
a779bc7bd1 subrepo: Update .hgsubstate in case of deleted subrepo
When a subrepo is deleted from .hgsub, it also needs to be removed from
.hgsubstate. Previous code was updating .hgsubstate only in case of newly or
modified subrepo.
2010-02-22 01:19:59 +01:00
Martin Geisler
355bb1daf3 progress: mark units for translation 2010-02-20 20:08:42 +01:00
Benoit Boissinot
7dae5be27b i18n: mark more strings for translation 2010-02-19 02:23:38 +01:00
Martin Geisler
e2e1279b27 progress: mark strings for translation 2010-02-17 23:07:50 +01:00
Sune Foldager
2369132b4b run commit and update hooks after command completion (issue1827)
Previously, the working dir state hadn't been written when these
hooks were invoked, so external commands couldn't see all changes.
2010-02-17 15:43:21 +01:00
Alexander Solovyov
f11ee5abee expand paths to local repository or bundle in appropriate classes
This avoids problem with unexpanded paths when it's not possible to
expand it at higher level (for example, if file:~/path/ is supplied as
path in schemes).
2009-12-07 12:31:45 +02:00
Matt Mackall
3b7a5c7ec1 progress: add progress calls to changeset discovery 2010-02-13 00:38:29 -06:00
Augie Fackler
123811715e localrepo: provide indeterminate progress information while bundling 2010-02-09 10:02:01 -06:00
Augie Fackler
47c5689cb6 localrepo: show indeterminate progress for incoming data
This has some quirks, like showing progress bars for importing
bundles, including during rebase.
2010-02-07 12:00:40 -06:00
Patrick Mezard
288790327a Merge with crew-stable 2010-02-13 02:06:13 +01:00
Giorgos Keramidas
a74504962c convert: differentiate between IOError and OSError on commitctx()
The IOError exception is overloaded to mean 'this file was deleted in
the current commit'.  Separate the code that handles IOError and file
deletion from general OSError exceptions.  The latter are real errors,
but IOError is not always a throwable error.

This solves the accidental marking of files as 'deleted' in commits that
try to write for example in .hg/store/data revlogs that the current user
has no permission to modify (a normal OSError that should abort the
current commit).

Changed by pmezard: use getattr() to be on the safe side.
2010-02-11 23:15:42 +02:00
Augie Fackler
2b4b265287 localrepo: add optional validation (defaults to off) for incoming changes
This verifies that all manifests are present for incoming changes,
and all files for those manifests are also present. This is a simple
first-pass, and could be better, but seems like a valuable thing to
have, as I've seen pushes in the past that propagated revlog corruption.
2010-02-11 16:37:43 -06:00
Peter Arrenbrecht
659da7174a whitespace cleanup 2010-02-08 20:51:23 +01:00
Benoit Boissinot
c8ed050aba prepush: add more precise error messages
Part of the patch is from timeless@mozdev.org

- indicate the branch name where there are multiple heads
- give better advice when hitting a possible race, where new heads are added
  between discovery and the call to branchmap(). In that case, asking the user
  to merge isn't helpful, since only remote has the changes.
2010-02-08 19:44:04 +01:00
Benoit Boissinot
fc2478db7d localrepo: cleanup branch tip computation 2010-02-08 14:52:28 +01:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Sune Foldager
9318efef10 fix bug in prepush logic involving merge changesets
When creating new branches and merging them into existing ones, you would
sometimes be able to push some changesets (the existing branches) without using
--force, even when that creates a new head on the remote.

A test which triggers the error has been added.
2009-11-30 14:58:52 +01:00
Dirkjan Ochtman
a0b7a8db3f strip apostrophes from an error messages 2010-02-07 15:09:02 +01:00
Peter Arrenbrecht
6a8e51ae73 bundle: don't send too many changesets (Issue1704)
The fast path in changegroupsubset can send too many csets. This happens
because it uses the parents of all bases as common nodes and then goes
forward from this again. If a base has a parent that has another child,
which is -not- a base, then this other child will nevertheless end up in
the changegroup.

The fix is to not use findmissing(), but use nodesbetween() instead, as
do the slow path and incoming/outgoing.

The change to test-notify.out is correct, because it actually hits this
bug, as can be seen by glog'ing the two repos:

@    22c88
|\
| o  0a184
| |
o |  0647d
|/
o  cb9a9

and

o  0647d
|
@  cb9a9

It used to pull 0647d again, which is unnecessary.
2009-11-07 12:28:30 +01:00
Sune Foldager
88f8c97e4b change 'journal already exists' to 'abandoned transaction found'
Journal already exists is a pretty internal piece of information, which
doesn't necessarily mean much to people who are not familiar with the code.
The new text is a more well-known concept.
2009-11-02 10:17:20 +01:00
Benoit Boissinot
77d119c7c3 localrepo/branchcache: remove lbranchmap(), convert users to use utf-8 names
We don't need a "local-charset" aware branchmap() function, we can convert the
names when needed during the output.
2009-10-31 00:31:08 +01:00
Benoit Boissinot
724ff6d9b3 localrepo/branchcache: kill unused localrepo.branchcache
The UTF-8 version of the branchcache is the master, always up-to-date, we can
rename it to localrepo._branchcache.
2009-10-31 00:27:50 +01:00
Benoit Boissinot
55d087a0fc localrepo/branchcache: rebuild the "charset-aware" branchcache when needed
It's simpler and the two cache weren't always in sync otherwise:
localrepo.branchcache would not be updated after calling branchmap()
2009-10-31 00:20:28 +01:00
Henrik Stuart
8e476f8bf5 transfer branchmap branch names over the wire in utf-8 2009-10-26 13:37:39 +01:00
Martin Geisler
42c594dc7e Merge with crew-stable 2009-09-27 09:38:53 +02:00
Sune Foldager
30958eab97 push: fix subtle bug in prepush logic
A test case demonstrating the bug has been added.
Contributed by Henrik Stuart and Sune Foldager.
2009-09-23 18:56:09 +02:00
Dirkjan Ochtman
a023094f1f merge with crew-stable 2009-09-23 15:54:43 +02:00
Sune Foldager
362c2022cc localrepo: fix bugs in branchheads and add docstring
- The call to reverse() reversed the list in place in the global branchmap.
- The nodesbetween function doesn't preserve ordering.
2009-09-23 15:51:36 +02:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Greg Ward
d0559b076a Improve some docstrings relating to changegroups and prepush(). 2009-09-08 17:58:59 -04:00
Martin Geisler
235f78e4fb Merge with crew-stable 2009-09-04 23:34:51 +02:00
Matt Mackall
c34b180a9c Make distinct lookup error for localrepo.lookup
This allows clone/share to correctly distinguish lookup errors from
corruption errors and catch only the former.
2009-08-31 10:58:33 -05:00
Henrik Stuart
180b39fb48 branch heads: optimise computation of branch head cache (issue1734)
The previous branch heads cache implementation iterated all ancestors
for each new revision in the repository, causing a massive slowdown on
cloning larger repositories.
2009-07-13 20:19:17 +02:00
Henrik Stuart
a44e9f8977 branch heads: fix regression introduced in 084c96645721 (issue1726)
For merge nodes it is not adequate to only check a single possible
branch head for whether it is an ancestor of the latest head, but it
needs to be done for each possible branch head.
2009-07-09 20:49:02 +02:00
Matt Mackall
fc2733b540 commit: lose some pointless 'nothing changed' messages
Move message from localrepo to commands. This drops confusing messages
in subrepo, import, and rebase.
2009-07-01 01:16:19 -05:00
Matt Mackall
540c02c8d3 commit: report modified subrepos in commit editor 2009-07-01 01:05:24 -05:00
Greg Ward
80075c97bf localrepo: document the locking scheme a little better
- localrepo: document lock(), wlock() methods
- lock: add class docstring
2009-08-05 14:42:57 +02:00
Greg Ward
da8b780a58 tags: support 'instant' tag retrieval (issue548)
- modify _readtagcache() and _writetagcache() to read/write tag->node
  mapping for global tags
- if (and only if) tip unchanged, use that cached mapping to avoid
  reading any revisions of .hgtags
- change so tag names are UTF-8 in memory in tags.py, and converted to
  local encoding as late as possible (in localrepository._findtags())
2009-07-16 10:41:19 -04:00
Greg Ward
81e6782a86 tags: implement persistent tag caching (issue548).
- rename findglobaltags() to findglobaltags1() (so the "no cache"
  implementation is still there if we need it)
- add findglobaltags2() and make findglobaltags() an alias for it
  (disabling tag caching is a one-line patch)
- factor out tagcache class with methods readcache() and writecache();
  the expensive part of tag finding (iterate over heads and find
  .hgtags filenode) is now in tagcache.readcache()
2009-07-16 10:39:42 -04:00
Greg Ward
0487eef6d6 localrepo: add destroyed() method for strip/rollback to use (issue548). 2009-07-16 10:39:41 -04:00
Greg Ward
5aa64bf085 Factor tags module out of localrepo (issue548).
Currently only handles reading tags, and will soon grow support for
tag caching.  Could eventually deal with updating tags too.
2009-07-16 10:39:41 -04:00
Greg Ward
0a46ad48e3 localrepo: factor updatetags() out of readtags() (issue548). 2009-07-16 10:39:41 -04:00
Greg Ward
310d950984 localrepo: improve readability of _findtags(), readtags() (issue548).
- rename many local variables
- add some comments
- refactor call to line.split() (catch ValueError rather
  than checking length of return value: one less local variable)
2009-07-16 10:39:41 -04:00
Greg Ward
37b1525e95 localrepo: rename in-memory tag cache instance attributes (issue548).
- self.tagscache to self._tags
- self._tagstypecache to self._tagtypes
- this is for consistency, readability, privacy, and to subtly hint
  that "caching" is something else
2009-07-16 10:39:41 -04:00
Greg Ward
b0c72fe36d localrepo: factor _findtags() out of tags() (issue548).
This makes in-memory caching the sole responsibility of localrepo,
eliminating some localrepo code that was duplicated in mq and
bookmarks.
2009-07-16 10:39:41 -04:00
Martin Geisler
bfee32e919 merge with crew-stable 2009-07-14 20:10:23 +02:00
Matt Mackall
eb6cba34d7 Merge with stable 2009-07-09 19:49:02 -05:00
Martin Geisler
a8dfb6533c localrepo: removed unnecessary revkey sort helper 2009-07-05 12:43:40 +02:00
Alejandro Santos
1ef2fb42a7 compat: use 'key' argument instead of 'cmp' when sorting a list 2009-07-05 11:02:00 +02:00
Brendan Cully
e55703261f Branch heads should not include "heads" that are ancestors of other heads.
For example, given 1 (branch a) -> 2 (branch b) -> 3 (branch a)
I expect "hg heads a" to show only 3.
Discovered by running hg heads HEAD on the mutt repo, where older clients
committed default on top of HEAD.
2009-06-29 00:54:23 -07:00
Martin Geisler
16155b528f merged with crew 2009-06-21 19:06:57 +02:00
Matt Mackall
689cdd2284 tags: silence warning about unknown tags
This is mostly a nuisance and can happen legitimately with pull -r, etc.
2009-06-20 10:53:47 -05:00
Dongsheng Song
4e62c61983 Fix warning: Seen unexpected token "%" 2009-06-19 14:28:29 +08:00
Matt Mackall
0524b599b7 tags: drop nested function 2009-06-18 23:08:33 -05:00
Matt Mackall
2d1077e9a8 tags: generate contexts directly 2009-06-18 23:04:54 -05:00
Matt Mackall
caca0c5d48 tags: reverse and simplify head-walking 2009-06-18 20:50:35 -05:00
Matt Mackall
536867428a tags: simplify rev handling 2009-06-18 20:50:33 -05:00
Matt Mackall
45eb44ee7b tags: fold in _hgtagsnodes 2009-06-18 20:49:50 -05:00
Matt Mackall
fd08adf4d6 commit: recurse into subrepositories 2009-06-15 02:45:38 -05:00
Matt Mackall
66b213eda6 repo: add internal support for sharing store directories
set .hg/sharedpath to point to the .hg to share with
2009-06-13 18:01:46 -05:00
Matt Mackall
da6d619643 repo: set up ui and extensions earlier 2009-06-13 14:44:59 -05:00
John Mulligan
8806103077 localrepo: remove 'closed' argument to heads(...) function
- repository heads are not associated with the closed attribute, so
remove it making the code in line with the concept.
- Fix functions that were calling heads with the parameter.
- Adjust webcommands.branches to include the concept of inactive
as well as open and closed branches
- Fix code and docstrings in commands to make the correct use of
closed branches & branch heads clearer
- Improve grammar of 'hg heads' help text (2nd submission)

this does not alter the cli for hg branches, that work is
still to be done
2009-06-10 19:11:49 -04:00
Henri Wiechers
4269cb82b8 cleanup: removed unused imports 2009-06-07 21:16:05 +02:00
Matt Mackall
5ae9b1fb50 commit: move some setup outside the lock 2009-06-04 16:21:03 -05:00
Matt Mackall
243b33c531 commit: rename wctx to cctx 2009-06-03 17:12:48 -05:00
Matt Mackall
8b6f125b5e commit: trade O(n^2) file checks for O(n^2) dir checks 2009-06-01 22:13:08 -05:00
Matt Mackall
fcb44e87db commit: move explicit file checking into repo.commit 2009-06-01 21:51:00 -05:00
Matt Mackall
7c83f8b030 commit: editor reads file lists from provided context 2009-06-01 14:51:47 -05:00
Matt Mackall
c1213eaf9d commit: drop the now-unused files parameter 2009-06-01 14:11:32 -05:00
Matt Mackall
914f8e938d tag: use match.exact for commit 2009-06-01 14:11:19 -05:00
Matt Mackall
c22dd49465 commit: apply force flag without files 2009-06-01 13:51:21 -05:00
John Mulligan
e094244749 localrepo: set heads and branchheads to be closed=False by default
The heads(...) and branchheads(...) functions will now only return closed
heads when explicitly asked for them. This will cause 'hg merge' to have
better behavior in the presence of a branch that has closed heads when no
explicit rev is passed.
2009-06-03 13:42:55 +02:00
Matt Mackall
37eaadf540 match: ignore return of match.bad
All users returned false, return can now be dropped
2009-05-31 17:54:18 -05:00
Martin Geisler
3f7c86dc69 wrap string literals in error messages 2009-05-31 01:30:16 +02:00
Adrian Buehlmann
7a0533d1fa localrepo: move comment 2009-05-28 08:29:40 +02:00
Simon Heimberg
1d6b2ca034 localrepo: use lock.release for single lock 2009-05-27 14:16:13 +02:00
Matt Mackall
1c30179455 lookup: check for dirstate damage on failure 2009-05-25 10:44:37 -05:00
Matt Mackall
89c18ad8ce match: add some default args 2009-05-24 02:56:14 -05:00
Matt Mackall
532c58d931 match: change all users of util.matcher to match.match 2009-05-24 02:56:14 -05:00
Sune Foldager
2161b139a6 named branches: improve pre-push logic (issue736)
Each named branch is considered separately, and the push is allowed if
no new branch heads are created for any named branch to be pushed.

Due to some tests's use of --debug, their output will change after this
addition. This has been fixed as well.

Co-contributor: Henrik Stuart <henrik.stuart@edlund.dk>
2009-05-23 17:04:31 +02:00
Henrik Stuart
e3379206dc named branches: server branchmap wire protocol support (issue736)
The repository command, 'branchmap', returns a dictionary, branchname
-> [branchheads], and will be implemented for localrepo, httprepo and
sshrepo.

The following wire format is used for returning data:

branchname1 branch1head2 branch1head2 ...
branchname2 ...
...

Branch names are URL encoded to escape white space, and branch heads
are sent as hex encoded node ids. All branches and all their heads are
sent.

The background and motivation for this command is the desire for a
richer named branch semantics when pushing changesets. The details are
explained in the original proposal which is included below.


1. BACKGROUND

The algorithm currently implemented in Mercurial only considers the
graph theoretical heads when determining whether new heads are
created, rather than using the branch heads as a count (the algorithm
considers a branch head effectively closed when it is merged into
another branch or a new named branch is started from that point
onward).

Our particular problem with the algorithm is that we'd like to see the
following case working without forcing a push:

Upsteam has:

(0:dev) ---- (1:dev)
\
 `--- (2:stable)

Someone merges stable into dev:

(0:dev) ---- (1:dev) ------(3:dev)
\                         /
 `--- (2:stable) --------´

This can be pushed without --force (as it should).
Now someone else does some coding on stable (a bug fix, say):

(0:dev) ---- (1:dev) ------(3:dev)
\                          /
 `--- (2:stable) ---------´---------(4:stable)

This time we need --force to push.

We allow this to be pushed without using --force by getting all the
remote branch heads (by extending the wire protocol with a new
function).

We would, furthermore, also prefer if it is impossible to push a new
branch without --force (or a later --newbranch option so --force isn't
shoe-horned into too many disparate functions, if need be), except of
course in the case where the remote repository is empty.

This is what our patches accomplish.


2. ALTERNATIVES

We have, of course, considered some alternatives to reconstructing
enough information to decide whether we are creating new remote branch
heads, before we added the new wire protocol command.

2.1. LOOKUP ON REMOTE

The main alternative is to use the information from remote.heads() and
remote.lookup() to try to reconstruct enough graph information to
decide whether we are creating new heads. This is not adequate as
illustrated below.

Remember that each lookup is typically a request-response pair over
SSH or HTTP(S).

If we have a simple repository at the remote end like this:

(0:dev) ---- (1:dev) ---- (3:stable)
\
 `--- (2:dev)

then remote.heads() will yield [2, 3]. Assume we have nodes [0, 1, 2]
locally and want to create a new node, 4:dev, as a descendant from
(1:dev), which should be OK as 1:dev is a branch head.

If we do remote.lookup('dev') we will get [2]. Thus, we can get
information about whether a branch exists on the remote server or not,
but this does not solve our problem of figuring out whether we are
creating new heads or not.

Pushing 4:dev ought to be OK, since after the push, we still only have
two heads on branch a.

Using remote.lookup() and remote.heads() is thus not adequate to
consistently decide whether we are creating new remote heads (e.g. in
this situation the latter would never return 1:dev).

2.2. USING INCOMING TO RECONSTRUCT THE GRAPH

An alternative would be to use information equivalent to hg incoming
to get the full remote graph in addition to the local graph.

To do this, we would have to get a changegroup(subset) bundle
representing the remote end (which may be a substantial amount of
data), getting the branch heads from an instantiated bundlerepository,
deleting the bundle, and finally, we can compute the prepush logic.

While this is backwards compatible, it will cause a possibly
substantial slowdown of the push command as it first needs to pull in
all changes.


3. FURTHER ARGUMENTS IN FAVOUR OF THE BRANCHMAP WIRE-PROTOCOL EXTENSION

Currently, the commands incoming and pull, work based on the tip of a
given branch if used with "-r branchname", making it hard to get all
revisions of a certain branch only (if it has multiple heads). This
can be solved by requesting the remote's branchheads and letting the
revisions to be used with the command be these heads. This can be done
by extending the commands with a new option, e.g.:

hg pull -b branchname

which will be turned into the equivalent of:

hg pull -r branchhead1 -r branchhead2 -r branchhead3

We have a simple follow-up patch that can do this ready as well
(although not submitted yet as it is pending the acceptance of the
branch patch).


4. WRAP-UP

We generally find that the branchmap wire protocol extension can
provide better named branch support to Mercurial. Currently, some
things, like the initial push scenario in this mail, are fairly
counter-intuitive, and the more often you have to force push, the more
it is likely you will get a lot of spurious and unnecessary merge
nodes. Also, restricting incoming and pull to all changes on a branch
rather than changes on the tip-most head would be a sensible extension
to making named branches a first class citizen in Mercurial.
Currently, named branches sometimes feel like a late-coming unwanted
step-child.

We have run it in a production environment for a while, with fewer
multiple heads occurring in our repositories and fewer confused users
as a result.

Also, it fixes the long-standing issue 736.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-05-23 17:02:49 +02:00
Benoit Boissinot
5b1d4a56ec filelog encoding: move the encoding/decoding into store
the escaping of directories ending with .i or .d doesn't
really belong to filelog.

we put the encoding/decoding in store instead, for backwards
compat, streamclone and the fncache file format still uses the
partially encoded filenames.
2009-05-20 18:35:47 +02:00
Martin Geisler
0a365d5ca2 use 'x is None' instead of 'x == None'
The built-in None object is a singleton and it is therefore safe to
compare memory addresses with is. It is also faster, how much depends
on the object being compared. For a simple type like str I get:

            | s = "foo" | s = None
  ----------+-----------+----------
  s == None | 0.25 usec | 0.21 usec
  s is None | 0.17 usec | 0.17 usec
2009-05-20 00:52:46 +02:00
Benoit Boissinot
32cfb07e37 localrepo: update commit*() docstrings 2009-05-19 11:39:12 +02:00
Matt Mackall
2c76d48a96 commit: tidy up mergestate slightly 2009-05-18 17:36:24 -05:00
Matt Mackall
74e80399a4 commit: drop unneeded dirstate invalidate logic
We no longer touch the dirstate in the middle of a commit, so a
failing commit doesn't require invalidating the dirstate.
2009-05-18 17:36:24 -05:00
Matt Mackall
4a8855a861 commit: some tidying
- simplify handling of 'close'
- kill silly wlock=None
- sort/uniq files later
2009-05-18 17:36:24 -05:00
Matt Mackall
7e42b4325d commit: remove unused lock var 2009-05-18 17:36:24 -05:00
Matt Mackall
98aa07c578 commit: move description trimming into changelog 2009-05-18 17:36:24 -05:00
Matt Mackall
6489ae039f commit: simplify manifest commit 2009-05-18 17:36:24 -05:00
Matt Mackall
89cb6de980 commit: move editor outside transaction
The commit editor is now invoked before files and manifest are
committed. The editor is now run with only the wlock held and aborting
an edit no longer requires rolling back a transaction. Changes to
files during a commit still result in undefined behavior.

(This is preliminary work for committing subrepositories)
2009-05-18 17:36:24 -05:00
Martin Geisler
6668b0e4a5 localrepo: use set.update for bulk updates 2009-05-17 16:56:53 +02:00
Benoit Boissinot
491d11faff localrepo: use set instead of dict 2009-05-17 04:33:39 +02:00
Matt Mackall
1317ac7a01 commit: hoist the rest of the dirstate manipulation out of commitctx 2009-05-14 13:24:39 -05:00
Matt Mackall
c2aadfc41a commit: hoist up dirstate invalidate 2009-05-14 13:24:39 -05:00
Matt Mackall
a8b0644dec commitctx: use contexts more fully 2009-05-14 13:24:26 -05:00
Matt Mackall
3a18f346a9 commitctx: eliminate some variables 2009-05-14 13:21:20 -05:00
Matt Mackall
38ebdc6dd1 commit: move lots of commitctx outside of the repo lock 2009-05-14 13:21:20 -05:00
Matt Mackall
a9fbdd49f0 commit: combine _commitctx and commitctx, drop unused force argument 2009-05-14 13:21:20 -05:00
Matt Mackall
ebe3b0ebc3 commit: move commit editor to cmdutil, pass as function 2009-05-14 13:20:40 -05:00
Matt Mackall
ad33c59077 commit: push repo lock down into _commitctx 2009-05-14 13:20:40 -05:00
Matt Mackall
580ab4b4ab commit: move 'nothing changed' test into commit() 2009-05-14 13:20:40 -05:00
Matt Mackall
771b18c870 commit: drop unused p1 and p2 args 2009-05-14 13:20:40 -05:00
Matt Mackall
d229f38315 tag: drop unused use_dirstate and parent from _tag() 2009-05-14 13:20:40 -05:00
Matt Mackall
49e6e0b6c0 filecommit: swallow some bits from _commitctx, add _ 2009-05-14 13:20:40 -05:00
Matt Mackall
e77584d5e2 commitctx: replace wctx with ctx 2009-05-14 13:20:40 -05:00
Matt Mackall
32a69c4899 commitctx: replace two dirstate vars with working 2009-05-14 13:20:40 -05:00
Matt Mackall
f0bc29419d commitctx: simplify locking
(spotted by Simon Heimberg)
2009-05-14 13:20:40 -05:00
Matt Mackall
fa65ae0679 remove deprecated rawcommit 2009-05-14 13:20:40 -05:00
Matt Mackall
cf4b3136aa status: check cmp list in order 2009-05-14 13:20:40 -05:00
Peter Arrenbrecht
87bb32e582 localrepo: use more direct vars in addchangegroup 2009-05-14 16:11:45 +02:00
Peter Arrenbrecht
c9505be494 localrepo: use cl throughout in addchangegroup 2009-05-14 16:09:27 +02:00
Peter Arrenbrecht
a75765cf7f drop unused imports 2009-05-14 15:35:46 +02:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Henrik Stuart
d0b7d204d4 transaction: refactor transaction.abort and rollback to use the same code
This adds a change to the way that abort is processed, as it will not continue
truncating files beyond the first failure, otherwise the respective
functionality is maintained, i.e. abort will not unlink files, but rollback
will.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-05-04 15:31:57 +02:00
Martin Geisler
6f75deac3f localrepo: mark commit message template for translation 2009-05-03 00:20:08 +02:00
Matt Mackall
f4f1e74f08 localrepo: use set for requirements 2009-04-29 20:47:28 -05:00
Matt Mackall
a2f3734c4c localrepo: use propertycache 2009-04-29 20:47:15 -05:00
Martijn Pieters
6644fca213 localrepo: Refactor var names in filecommit to improve readability. 2009-04-28 18:14:49 +02:00
Martin Geisler
29ac8050fe localrepo: corrected outdated comment 2009-04-28 18:32:15 +02:00
Martin Geisler
3ea1f07ffc localrepo: fixed typos in comments 2009-04-28 18:29:50 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
f6c8930392 replace various uses of list.reverse() 2009-04-26 16:50:44 -05:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Matt Mackall
88b13fecec ui: replace parentui mechanism with repo.baseui 2009-04-26 16:50:43 -05:00
Martin Geisler
6a1b0a03df localrepo: use sets in findcommonincoming 2009-04-24 17:32:18 +02:00
Martin Geisler
e2222d3c43 replace set-like dictionaries with real sets
Many of the dictionaries created by dict.fromkeys were emulating sets.
These can now be replaced with real sets.
2009-04-22 00:57:28 +02:00
Martin Geisler
44aa7e92d1 util: use built-in set instead of util.unique 2009-04-22 00:56:06 +02:00
Martin Geisler
1deb417a82 util: use built-in set and frozenset
This drops Python 2.3 compatibility.
2009-04-22 00:55:32 +02:00
Ronny Pfannschmidt
83cc19618e document the locking pattern in localrepo.status 2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
5356baa346 switch lock releasing in the core from gc to explicit 2009-04-22 02:01:22 +02:00
Ronny Pfannschmidt
f55e3eb9a7 made repo locks recursive and deprecate refcounting based lock releasing
all locks should use the explicit lock.release

mercurial.lock.lock.__del__ handles unwrapping recursive locks

localrepo.lock/wlock are still using weakref in order to keep backward
compatibiltiy to releasing locks via garbage collection
by ensuring the release on __del__
2009-04-22 02:01:22 +02:00
Henrik Stuart
e8d7a7c8ef transaction: support multiple, separate transactions
Solves that committed (closed) transactions may linger and be returned
on subsequent transaction calls, even though a new transaction should
be made, rather than a new nested transaction.

This also fixes a race condition with the use of weakref.
2009-04-15 19:54:22 +02:00
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Martin Geisler
541fd005f1 merge with -stable 2009-03-31 23:11:11 +02:00
Simon Heimberg
5ebb56cc6d error: import LockError from correct module 2009-03-31 07:56:28 +02:00
Matt Mackall
805511403b resolve: move reset to localrepo.commit
This way rebase doesn't leave a stale resolve state
2009-03-16 16:58:41 -05:00
Peter Arrenbrecht
19591b6a8c cleanup: drop unused assignments 2009-03-23 13:13:06 +01:00
Matt Mackall
104cda5c20 tag: force load of tag cache 2009-03-02 19:19:09 -06:00
Matt Mackall
cb4d50ff04 Introduce HG_PREPEND to solve pretxn races
- add writepending to flush delayed writes to separate file
- add support in hooks for lazy evaluation of callable parameters
- add HG_PENDING to pretxn hooks
  - call writepending if hook is used
  - pass repo root to hook environment
- if HG_PENDING = repo root, we're in pretxn hook
  - read pending data to make pending changesets visible
- filter HG_PENDING in tests/printenv.py
2009-02-16 19:35:07 -06:00
John Mulligan
5622da3160 branch closing: permit closing the default branch
There was no good reason to special case the 'default' branch.
Allow the 'default' branch to be closed if the user wants it.

If you're uncomfortable about mistakenly closing the default branch,
you can always reopen the branch by commiting a "normal" changeset onto
the closed branch.
2009-01-25 13:20:43 -05:00
Matt Mackall
880396d2b7 Merge with stable 2009-01-25 12:09:51 -06:00
Matt Mackall
a8a2c25a67 wire protocol: avoid infinite loop (issue1483) 2009-01-25 10:16:45 -06:00
Patrick Mezard
7930704b3e localrepo: fix bad manifest delta generation (issue1433)
The issue came from the 63f9ab8034d1 fix for issue586 working only for
manifest.add() fast path, where the incorrect removed file set was
ignored. This path was no longer taken after 5958346d119e refactoring.
2009-01-03 20:16:10 +01:00
Patrick Mezard
1977ae7dbb Merge with crew-stable 2009-01-25 18:58:12 +01:00
Patrick Mezard
56a4e737a8 Fix a corner case when committing a rename after a merge (issue1476) 2009-01-25 18:55:29 +01:00
Dirkjan Ochtman
0f821bb2e9 kill some trailing whitespace 2009-01-19 12:59:56 +01:00
John Mulligan
664f4bfd51 branch closing: referencing open and closed branches/heads
Treat fully closed branches similarly to "inactive" in the output of
'hg branches'. They will be suffixed with "(closed)" where inactive branches
are marked with "(inactive)". If the -a/--active option is given both
inactive and closed branches will not be shown.

Partially closed branches (multiple heads, at least one not closed)
will display the next (tipmost) open head.

Add -a/--active option to "hg heads" which will hide closed heads iff the
option is specified.

In other hg commands, when multiple branch heads exist the branch name will
refer to the tipmost open head, and if none exist, then the tipmost closed
head.
2009-01-14 21:47:38 -05:00
John Mulligan
778b3b9d49 branch closing: mark closed branches with a 'close' extra
Adds a --close-branch option to commit.
When --close-branch is present the commit will mark the changeset
with close=1 in the changeset extras field.

If a regular changeset is added on top of a closed head the branch
is no longer considered closed, and thus re-opened.
2009-01-14 21:47:38 -05:00
John Mulligan
9e580fc6f7 store all heads of a branch in the branch cache
All heads of branches will be stored in a new cache file 'branchheads.cache'
within the .hg directory. The old 'branch.cache' file from older versions
will be ignored.

The new cache contents are formatted line-by-line as '{node} {branchtag}\n'.
This is the same as the previous format. Now, every head is recorded in
an oldest -> tipmost order.

The localrepo.branchheads function is reworked to use the data from the cache.
2009-01-14 21:47:38 -05:00
Matt Mackall
7f3bf9b19d error: move SignalInterrupt
now derived from KeyboardInterrupt to simplify catches
2009-01-12 11:48:05 -06:00
Matt Mackall
534da54d07 error: move UnexpectedOutput (now ResponseError) 2009-01-12 11:28:28 -06:00
Matt Mackall
76c90d50e6 error: move lock errors
rename LockException to LockError
2009-01-12 11:09:14 -06:00
Matt Mackall
e0735a1762 error: move repo errors
rename NoCapability to CapabilityError
2009-01-12 10:42:31 -06:00
Matt Mackall
d15d559b7c errors: move revlog errors
- create error.py for exception classes to reduce demandloading
- move revlog exceptions to it
- change users to import error and drop revlog import if possible
2009-01-11 22:48:28 -06:00
Dirkjan Ochtman
574603a8c0 use dict.iteritems() rather than dict.items()
This should be faster and more future-proof. Calls where the result is to be
sorted using util.sort() have been left unchanged. Calls to .items() on
configparser objects have been left as-is, too.
2009-01-12 09:16:03 +01:00
Martin Geisler
cbcd677f60 lowercase ui.debug and assert output
This does not effect the log or status commands and should be okay
according to the compatibility rules.
2009-01-03 17:15:21 +01:00
Dirkjan Ochtman
31559160e8 localrepo: inline single-use nested function 2010-02-07 10:01:55 +01:00
Dirkjan Ochtman
a1424fe8be localrepo: unify changegroup and changegroupsubset code paths a bit 2010-02-07 09:58:41 +01:00
Benoit Boissinot
4de7d9563f prepush: warn about every new outgoing named branch, not just the first 2010-02-07 00:43:24 +01:00
Benoit Boissinot
c3885a8049 prepush: rename variables, refactor 2010-02-07 00:43:22 +01:00
Dirkjan Ochtman
fbcdc0c662 localrepo: add a quick docstring for localrepo.branchmap() 2010-02-06 11:29:23 +01:00
Vsevolod Solovyov
d3e723589a add options dict to localrepo.store.opener and use it for defversion 2010-02-05 19:10:26 +01:00
Henri Wiechers
d6fe397468 localrepo: minor formatting - remove double space 2010-02-05 17:02:27 +02:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00
Augie Fackler
678623416a dirstate: don't check state of subrepo directories 2009-12-31 17:19:30 -06:00
Benoit Boissinot
23e250f6a9 changegroupsubset: readdelta() can be used if the previous rev is a parent 2009-12-04 17:43:01 +01:00